5

As part of our managed package we have a post-install script that inserts push topics to support the integration between our solution and SF.

Before today this post install script worked fine. I was able to download the app from the exchange and install it into any org; everything worked as expected.

Today, I uninstalled a prior version of the app from a demo org I had spun up to prep for training the sales team and support staff on this new version. When I try to install it I get a the following from the Apex Exception email:

caused by: System.QueryException: sObject type 'PushTopic' is not supported.

Class.redblack.RBS_PushTopicLifeCycleManager.doInsert: line 130, column 1 Class.redblack.RBS_PostInstallScript.postPushTopics: line 28, column 1 Class.redblack.RBS_PostInstallScript.onInstall: line 21, column 1

The query I have is simply this:

[Select Id, Name,Query,APIVersion, NotifyForOperationCreate,NotifyForOperationUpdate,NotifyForOperationUndelete,NotifyForOperationDelete,NotifyForFields From PushTopic]

The streaming API feature is enabled via the user interface in this org, as well as the API Enabled system permission via a permission set assigned to the user performing the install (me).

The class that runs all this is configured for API version 44.0, which is the same attribute I am assigning to the push topics on create.

I don't get it. It worked fine with the prior version yet now it won't work. Has anyone ever run into this before?

7
  • What is your salesforce edition? Jul 16, 2019 at 17:20
  • partner enterprise in the demo org I am trying to deploy the package to
    – Kevin
    Jul 16, 2019 at 17:22
  • Can you try this before installing the package? Setup -> User Interface -> Enable Dynamic Streaming Channel Creation and Enable Streaming API Jul 16, 2019 at 17:48
  • @pranay Both options were already enabled. The Enable Streaming API was not at first but it was something I toggled when I first bumped into this issue. I made sure to enable full read/write/create/delete on the Push Topic object and additionally View All and Modify All on the Streaming Channel object
    – Kevin
    Jul 16, 2019 at 18:07
  • @pranay Do you know what user credentials the system is running in when installing the app? Is it the credentials of the user who clicked 'get it now' or does it run in system mode under an integration user or some other masked credential? Wondering as I do have the 'with sharing' in my push topic lifecycle manager class (it was there before so don't know why this would be the issue now but at this point its about ruling things out) :)
    – Kevin
    Jul 16, 2019 at 18:10

0

You must log in to answer this question.