Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to the Salesforce Metadata API. #110

Closed
Bazza2015 opened this issue Jan 23, 2015 · 73 comments
Closed

Unable to connect to the Salesforce Metadata API. #110

Bazza2015 opened this issue Jan 23, 2015 · 73 comments
Labels

Comments

@Bazza2015
Copy link

Hi,

I am experiencing the same problems as reported in issue #102.

I've installed the package 1.16, also tried uninstalling and installed 1.15 but receive the same error message. Re-installed 1.16 and currently receive the error message:

Unable to connect to the Salesforce Metadata API.
A Remote Site Setting must be created in your org before you can use this tool.
Press the Create Remote Site Setting button to perform this step or refer to the post install step below to perform this manually.

Under Remote Sites, I have an entry for dlrs_mdapi setup as https://dlrs.eu0.visual.force.com

When trying to activate a summary, I receive the error message:
Error: Apex Trigger dlrs_AccountTrigger has not been deployed. Click Manage Child Trigger and try again.

Any ideas on why this is happening?

@afawcett
Copy link
Collaborator

Yeah i remember issue 102, it was intermittent in the end, the poster gave me support access and i was able to deploy the trigger and didn't see any sign of the remote site issue, most odd. In your case, is it happening all the time, no matter how many times you try to deploy the trigger? If so, i'd love to take a closer look if you would be happy to arrange support access? I would just need to know your Org ID. If not, maybe some more screenshots and Apex Debug logs can help me get a closer look. Let me know, keen to get to the bottom of this for sure! 👍

@Bazza2015
Copy link
Author

Hi Andrew,

Yes it happens every time, although I may have missed something completely obvious when deploying the managed package.

I’ve granted you access, org id = 00D200000005B5O

Best regards,
Barry

From: Andrew Fawcett [mailto:notifications@github.com]
Sent: 24 January 2015 09:39
To: afawcett/declarative-lookup-rollup-summaries
Cc: Barry Clark
Subject: Re: [declarative-lookup-rollup-summaries] Unable to connect to the Salesforce Metadata API. (#110)

Yeah i remember issue 102, it was intermittent in the end, the poster gave me support access and i was able to deploy the trigger and didn't see any sign of the remote site issue, most odd. In your case, is it happening all the time, no matter how many times you try to deploy the trigger? If so, i'd love to take a closer look if you would be happy to arrange support access? I would just need to know your Org ID. If not, maybe some more screenshots and Apex Debug logs can help me get a closer look. Let me know, keen to get to the bottom of this for sure! [:+1:]


Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-71307557.

@afawcett
Copy link
Collaborator

Sorry Barry, can you give me a little more time to go in, as i support this tool in my spare time i don't often get back to these issues within a day. Can you extend the support access a little further please and I'll take a look. Thanks. 👍

@Bazza2015
Copy link
Author

No problem, access extended.

@afawcett
Copy link
Collaborator

Ok, trigger deployed, i didn't see any issues on the tab splash page (suggesting the remote site doesn't exist), nor did i encounter any errors deploying the trigger. I did also briefly enable the Active checkbox on the trigger to check that, also good. So i've logged out, the trigger is deployed, but i have left the Active checkbox unchecked for you to enable later. Its all very strange this problem, this is exactly what happened in the other issue, as soon as i went in it was working! 👍

@Bazza2015
Copy link
Author

Ok thanks for your help. How bizarre!
I see the error on the splash screen (attached) but I am now able to activate the trigger.
screenshot

@afawcett
Copy link
Collaborator

That is really spooky, considering how i logged in as your user, as mad as it might sound i am starting to wonder if logging in via Subscriber Support has some soothing effect on the issue?!?!?! Is there anything unusual about your user you can think?

@Bazza2015
Copy link
Author

I'm setup with the System Administrator profile. I've been administering the system for the past 7 years and not aware of any obvious limitations on this profile. I took on board the advise provided in issue #102 to no avail. Thought an install of an older version might fix but no joy.

@afawcett
Copy link
Collaborator

Most odd, i'm going to leave this open as an enhancement, to log a bit more info on the above page when this issue occurs (internally its catching an error to determine if MD API is configured). Maybe exposing more info (at the cost of it looking a little more techie) might help in the future.

@Bazza2015
Copy link
Author

No problem.

@itsabsolute
Copy link

Andrew, the issue 102 I logged still perists and is likely related. Very interested and this is on the radar, I can grant you access as well if that helps troubleshoot.

@afawcett
Copy link
Collaborator

Ok, i've added some additional debug output to the page, this will be in the next release, likely this coming weekend. As you can see from the screenshot when a connection failure is found, it will dump the underlying exception text. The one i get is expected, since you both have the Remote Site setting setup, i'm assuming there is some other underlying error for which this new debug feature will reveal. It works btw regardless of subscriber support, so you can check it yourselves and pass back here. Hopefully this will shed some more light on the matter! 👍

screen shot 2015-02-10 at 09 36 57

@Bazza2015
Copy link
Author

Hi Andrew,
I've deployed the latest code release and can now see the debug message on the splash screen. Still having problems deploying new rollups. Hopefully the below information can provide new insight into the issue.

When I try to activate a new rollup, I receive the following:
Error: Apex Trigger dlrs_CaseTrigger has not been deployed. Click Manage Child Trigger and try again.

When I click Manage Child Trigger I receive the following:
Error:
Salesforce Metadata API connection failure, click the link below to configure.

When I go to the spash screen and click Remote Site Setting:
DEBUG USE ONLY: Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor=

@afawcett
Copy link
Collaborator

Hmmmmm can you check the 'API Access' setup against the package, go to Setup and Installed Packaged, click the package and check what 'API Access' says....

screen shot 2015-03-11 at 18 45 17

@afawcett
Copy link
Collaborator

You could also check that your profile has 'API Enabled' ticked.

@Bazza2015
Copy link
Author

API access unrestricted and API enabled on my profile.

[cid:image004.jpg@01D05CA1.36D9D540]

[cid:image003.png@01D05CA1.0A586680]

From: Andrew Fawcett [mailto:notifications@github.com]
Sent: 11 March 2015 18:44
To: afawcett/declarative-lookup-rollup-summaries
Cc: Barry Clark
Subject: Re: [declarative-lookup-rollup-summaries] Unable to connect to the Salesforce Metadata API. (#110)

Hmmmmm can you check the 'API Access' setup against the package, go to Setup and Installed Packaged, click the package and check what 'API Access' says....

[screen shot 2015-03-11 at 18 45 17]https://cloud.githubusercontent.com/assets/1167760/6604163/8da9a2d6-c81e-11e4-8395-fbc9a3193f65.png


Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-78343185.

@afawcett
Copy link
Collaborator

The images didn't make it through above, but i see your comment anyway, hmmm.... so.... Session ID's are not all made equal, things like the above and other factors can cause them to carry different capabilities when used, so i suspect something else in your environment is adjusting the Session Id for your user, i just cannot think what right now... Do you have things like community or my domain enabled perhaps?

@Bazza2015
Copy link
Author

I don’t have community or domain enabled.

I can de-activate / activate an existing rollup summary without any problems, e.g. Rollup Number of Child ActWS (this was the roll-up you were able to activate when you logged in remotely).
When I create a new rollup and try to activate I get Aprex trigger error message. Screenshot attached (Error: Apex Trigger dlrs_CaseTrigger has not been deployed. Click Manage Child Trigger and try again)

I’ve granted temporary access to see if you can activate remotely.

From: Andrew Fawcett [mailto:notifications@github.com]
Sent: 12 March 2015 09:17
To: afawcett/declarative-lookup-rollup-summaries
Cc: Barry Clark
Subject: Re: [declarative-lookup-rollup-summaries] Unable to connect to the Salesforce Metadata API. (#110)

The images didn't make it through above, but i see your comment anyway, hmmm.... so.... Session ID's are not all made equal, things like the above and other factors can cause them to carry different capabilities when used, so i suspect something else in your environment is adjusting the Session Id for your user, i just cannot think what right now... Do you have things like community or my domain enabled perhaps?


Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-78445826.

@afawcett
Copy link
Collaborator

I can for sure help you out by deploying the trigger via Subscriber Support, once this is done for a child object, you can freely activate/deactive an existing or new rollup based on that child. Let me know which rollup you want me to press the Mange Child Trigger button on, and i'll help you through this while we try to figure this big puzzle out....

@Bazza2015
Copy link
Author

Thank you Andrew,

Could you activate “Closed Cases This Month” please?

From: Andrew Fawcett [mailto:notifications@github.com]
Sent: 12 March 2015 18:44
To: afawcett/declarative-lookup-rollup-summaries
Cc: Barry Clark
Subject: Re: [declarative-lookup-rollup-summaries] Unable to connect to the Salesforce Metadata API. (#110)

I can for sure help you out by deploying the trigger via Subscriber Support, once this is done for a child object, you can freely activate/deactive an existing or new rollup based on that child. Let me know which rollup you want me to press the Mange Child Trigger button on, and i'll help you through this while we try to figure this big puzzle out....


Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-78563124.

@afawcett
Copy link
Collaborator

Ah sorry, the subscriber login must have timed out, if you can extend over the weekend, i can try and do then for you.

@Bazza2015
Copy link
Author

No problem, I’ve extended it for another 7 days.

From: Andrew Fawcett [mailto:notifications@github.com]
Sent: 13 March 2015 18:11
To: afawcett/declarative-lookup-rollup-summaries
Cc: Barry Clark
Subject: Re: [declarative-lookup-rollup-summaries] Unable to connect to the Salesforce Metadata API. (#110)

Ah sorry, the subscriber login must have timed out, if you can extend over the weekend, i can try and do then for you.


Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-79204395.

@afawcett
Copy link
Collaborator

The trigger is now deployed, you can now toggle the Active field on the rollup or any other rollup based on that object.

@afawcett
Copy link
Collaborator

I added this to the known issues list.

@rbhagat30
Copy link

can someone please suggest how developer mode will work . i dont want to schedule job on real time in need to select developer mode. but i need to click on calculate button manully to get the result . when i am trying to schedule job to excute schedule button it is not allowing me to use objects of this pacakge

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

Hi Andy,
I'm having this problem now, but I think it's because this org has restricted IPs.
Remote Site setting is configured.

DEBUG CODE:
Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor=

Screen Shot of Managed Package settings doesn't have any line for API connection! (hope it comes through).

screen shot 2018-06-18 at 9 56 46 am

Do you have any ideas? Of all my customers, this is the only one that has given me a problem and I think it's their security settings...

Thanks!
Leigh-Anne

@DanDonin
Copy link
Contributor

DanDonin commented Jun 18, 2018 via email

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

Just deploy the trigger via changesets?
Forgive my confusion, I can't seem to get the Packaged installed properly let alone create a trigger.
Are you referring to the APEX that's included in the package? Is there one in particular I should be looking at? They all seem to be active.

@DanDonin
Copy link
Contributor

DanDonin commented Jun 18, 2018 via email

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

This is what I see on my Welcome Page.
I was able to set up the remote settings. But it seems to be an issue with connecting with the API. I saw some previous posts to check the API setting in the Managed Page page, but I don't even have a line there to say if it's Unrestricted or not.

screen shot 2018-06-18 at 10 45 18 am

@DanDonin
Copy link
Contributor

DanDonin commented Jun 18, 2018 via email

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

:( Salesforce Metadata API connection failure. Never had this before.

screen shot 2018-06-18 at 11 03 16 am

@DanDonin
Copy link
Contributor

DanDonin commented Jun 18, 2018 via email

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

You mean like this?

screen shot 2018-06-18 at 11 37 39 am

screen shot 2018-06-18 at 11 37 31 am

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

I clicked Classic and will give it a try! Stand by!

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

OK - Stuck.
When I get to Manage Child Trigger, I get this error. How would I deploy this dlrs_ContentDocumentTrigger as a changeset?

screen shot 2018-06-18 at 11 41 45 am

@DanDonin
Copy link
Contributor

DanDonin commented Jun 18, 2018 via email

@LanCRM
Copy link

LanCRM commented Jun 18, 2018

I can't even view the APEX. Thats the page I see when I click Manage Child Error.
I can't find the Trigger anywhere.

@EmilyPagua
Copy link

helo,
I have the same problem than @LanCRM , and I can't create apex classes.
what is the solution? do you have idea?

1

@LanCRM
Copy link

LanCRM commented Jun 21, 2018

@EmilyPagua no work around as yet. In another org, a few of my roll ups caused some errors. So I've been troubleshooting that too.

@afawcett
Copy link
Collaborator

afawcett commented Jun 24, 2018

When you click "Return to Welcome page" link can you show the screenshot?

@afawcett
Copy link
Collaborator

Check the known issues in the README, there is some good tips on session issues. See screenshot above from the Welcome page, this shows a session error.

@EmilyPagua
Copy link

@afawcett this is the error, i did the steps shown in previous comments, but i still get the same error.
1

@bblcastro
Copy link

@afawcett - I saw this post and I am experiencing the same issue. Can you help me?

@dkovalov
Copy link

@afawcett - the same issue(

1 similar comment
@dlisovsky
Copy link

@afawcett - the same issue(

@tlepke
Copy link

tlepke commented Dec 16, 2020

Hi All,

I am getting the same error:

Nothing I have tried is fixing this. Thanks for the help!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests