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

Chrome extension "Salesforce Navigator for Lightning" not working for some orgs  #34

Closed
anshul-goyall opened this issue Jun 15, 2023 · 9 comments

Comments

@anshul-goyall
Copy link

When it works, it works like a charm, but the only problem I see is that for some of the orgs it does not work but for some it does. It really is behaving based on the org and I am not sure why. For example - this is working on the domain "https://bataustria--uat.sandbox.lightning.force.com/". But not on domain "https://ptorg--aotfpoc.sandbox.lightning.force.com/"

Could you please help if you are aware of this issue? Is this expected and what is the resolution to make it work on every org?

@dannysummerlin
Copy link
Owner

Hi there, I've just moved countries so I'm behind on things, but that is definitely not the intended behavior! Can you try opening up the developer console while in the instance that is throwing errors and see if there are any messages that stand out as being errors from Salesforce Navigator? We'll have to recreate the issue to get to the bottom of it I'm afraid.

@davidGravityLab
Copy link

When it's worked on some orgs and not others for me, it's been related to the "Require HttpOnly attribute" value being true in session settings.

This is the error that comes up:
image
related to this part of the code.
image

@JarrahN
Copy link

JarrahN commented Oct 11, 2023

Hi @dannysummerlin

I have replicated the same issue as @davidGravityLab has defined. Here is my value for document.cookie (trimmed) with RequireHttpOnly checked

"BrowserId_sec=...; _ga=...; BrowserId=...; CookieConsentPolicy=0:1; LSKey-c$CookieConsentPolicy=0:1; sfdc-stream=...; sid_Client=...; clientSrc=...; inst=APP_F6"

vs RequireHttpOnly unchecked (after a logout/login)

"BrowserId_sec=...; _ga=...; BrowserId=...; CookieConsentPolicy=0:1; LSKey-c$CookieConsentPolicy=0:1; sfdc-stream=...; sid_Client=...; clientSrc=...; inst=APP_Hz; sid=..."

The sid attribue isn't available in the first instance

@dannysummerlin
Copy link
Owner

Thank you @davidGravityLab and @JarrahN, that was perfect, put me on the right track. The bad news is is that then that is just working as intended - the RequireHTTPOnly flag hides the session id from the Javascript environment, which I understand in theory but in practice that means I would need to write a full login and token handling apparatus for the extension, and I honestly do not have that kind of time.

If anyone knows of any other place to get the session id from (I went hunting in the JS objects SF creates for the page and couldn't find it) I'm more than happy to rewrite the check for that, but in the mean time I'm just going to have to add a warning that this extension is incompatible with that setting. Again I get the theoretical value of hiding the sid, but practically I see its benefits and in this particular case can't create the workaround. I'm always open to pull requests though for anyone who wants to take that on!

@dannysummerlin
Copy link
Owner

Actually, scratch some of that - the sid is used to do the queries to get custom objects, so I should actually be able to make it work for everything but that so it is at least still a little useful. I'm doing some testing now, more soon.

@dannysummerlin
Copy link
Owner

dannysummerlin commented Oct 15, 2023

Okay, so I have that set up, if you activate RequireHTTPOnly you won't be able to get to Custom Objects, but most everything else should work (oh except Login As, that also requires the sid). Version 4.8.2 should be on the way, lemme know how that turns out!

@DavidSmithnz
Copy link

DavidSmithnz commented Oct 16, 2023 via email

@JarrahN
Copy link

JarrahN commented Oct 25, 2023

Thanks @dannysummerlin can confirm its working me also!

@dannysummerlin
Copy link
Owner

Glad to hear it, thanks for the help in getting there!

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

No branches or pull requests

5 participants