Support » Plugin: Object Sync for Salesforce » Authentication failed with “No request found for this application.”

  • Resolved The Coder

    (@codestylist)


    Hi guys.
    I hope to open a new topic regarding my issue. I assume it is not code related but I hope to get an idea where I can fix this.
    My Plugin was connected with Salesforce. Because I didn’t get an update of objects, I tried to re-connect the plugin to force an update. When I click on Connect to Salesforce on the Authorize Tab I have to login on Salesforce again. After that the redirection to /wp-admin/options-general.php?page=object-sync-salesforce-admin&tab=authorize&code=… is done but instead seeing the additional tabs I get the message No request found for this application. on a white page. Nothing else.
    I checked the code and couldn’t find this string. So, I assume this message comes from Salesforce. But I have no clue what can be different than before.
    Remember, I disconnected and tried to re-connect with the same settings. Nothing was changed on Salesforce during this process.
    Does anybody have an idea what could happen and where I have to check to solve this issue?
    Thank you for your time reading this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Jonathan Stegall

    (@jonathanstegall)

    I’m not familiar with that error message at all. Salesforce does have odd error messages from time to time and I’ve noticed that if it’s during the authorization process we usually can’t detect them in advance (which is why there’s just a white screen, maybe), but I don’t think I’ve ever seen that one.

    I think if you are trying to start over, you might want to delete all of the plugin’s settings/data and then try.

    Thank you @jonathanstegall for your reply. I had a session with the Salesforce team today and they and I couldn’t find any wrong settings.
    When activating the Debug Checkbox in settings, I do not get any log file.
    I’m wondering if it is possible to debug the request after successful authentication so, I can show the Salesform team what exactly is requested.
    Could you help me by pointing me to the right direction getting more details for that, please?

    Plugin Contributor Jonathan Stegall

    (@jonathanstegall)

    Are you asking how logging works in this plugin? It does not create a log file, but rather a log post type. You can read more about that here in the docs: https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/logging.md

    Beyond that there’s really not much I can help you with. Salesforce doesn’t do a lot of its own logging unless you turn it on and that is way beyond the scope of support I can offer.

    In know this logging feature. But, I get access to this tab afterwords I have a successful login, right? I need a debugging which works until the authentication process.
    Please remember, I get the error message from the very first post after the authentication was successful.
    I know the message No request found for this application comes from Salesforce but, how can I get the information and details for the request itself?
    Could you tell me where I can add some temporarily debug outputs to show up the complete request which was sent to Salesforce? Just point me to the file and maybe line where the output is doing. I will find the rest by myself. Thanks!

    Plugin Contributor Jonathan Stegall

    (@jonathanstegall)

    Ah, I see. You’re going to want to work with the /classes/salesforce.php file. Probably start with the get_authorization_code and request_token methods. My guess is something breaking in one of those.

    Also it occurs to me to make sure that you’ve actually created the application in Salesforce and that it’s working the way it’s supposed to be. You’ve followed all of the instructions here? https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/initial-setup.md#salesforce

    Perfect. Thank you very much. I’ll have a look into this file and start debugging there.
    Yes, I followed the application settings guideline as you mentioned.
    The strange thing is, it was working until I forced a re-connection. But, I will see.
    Thank you for your time, for now.

    @jonathanstegall I’m sorry, but I need once more your help/knowledge.
    I hope you can exactly tell me where you throw the SF error message.
    As after SF login I get a redirection to wp-admin/options-general.php?page=object-sync-salesforce-admin&tab=authorize&code=somecodeishere. On this url I get the SF error message.
    I assume the authentication works. But, the question is what happen on the page above and which part of your code is responsible to show the SF error message? Could you please explain what happen after successful authentication and after redirection before showing the authorize tab again?
    I assume there should be a request on SF to show the additional tabs, right?
    As I asked in my earlier posts I need to know exactly what your plugin is requested.
    Can you please help me and point me to the right code where I can start debugging, please?!
    Thanks!

    Plugin Contributor Jonathan Stegall

    (@jonathanstegall)

    Yes, that’s the request_token method in the class I mentioned earlier. You might also look at the admin.php class where the authorizing calls happen. See these lines of code.

    Essentially, here’s what is supposed to happen:

    1. You click the authorize button, it sends you to Salesforce, and you log in.
    2. Salesforce returns you to your site’s callback URL, wp-admin/options-general.php?page=object-sync-salesforce-admin&tab=authorize&code=something
    3. The Salesforce API uses that code to create some tokens and save them in the database. This happens in the salesforce.php class in the is_authorized method, which calls the get_refresh_token method.
    4. Once all of the tokens are saved in the database, it loads the correct template for being authorized.

    I’m not sure I can help you any further than that, really. It can be a complicated plugin, so you may want to look for some consulting help if the debugging is not possible.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.