mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4922] [bug]: Desktop login to self hosted instance not working #1853
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1853
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @brecht-vermeersch on GitHub (Mar 20, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4922
Originally assigned to: @CuriousCorrelation on GitHub.
Is there an existing issue for this?
Current behavior
When I log in to my self hosted instance with the Desktop app, the interface keeps spinning.
Steps to reproduce
Logs and Screenshots
Environment
Production
Hoppscotch Version
Self-hosted
Interceptor
Not Applicable - Issue not related to network requests
Browsers Affected
No response
Operating System
MacOS
Additional Information
No response
@brecht-vermeersch commented on GitHub (Mar 20, 2025):
The token seems to be logged in the console
@CuriousCorrelation commented on GitHub (Mar 20, 2025):
Hi @brecht-vermeersch, Thanks for flagging this issue.
Quick questions:
@brecht-vermeersch commented on GitHub (Mar 20, 2025):
Which desktop app version are you using?
Version 25.2.3 (20250319.113058)
Is this a recent development or has this been happening from a prior version?
We only started using hoppscotch today, so no experience with older versions. Issue occurs for both macos and windows users.
Were there any console logs or errors when you logged in via the web app in the browser?
Web app login works fine. No errors logged.
Are you able to log in if you were to restart the app when it gets stuck on loading?
Doesn't work after restarting. Also tried removing the instance and adding it again
@CuriousCorrelation commented on GitHub (Mar 20, 2025):
Thanks for the info, @brecht-vermeersch. This helps narrow down the issue.
One more question if you don’t mind: For macOS users, could you check if your access token is properly stored in the app's local data?
Path to check:
~/Library/Application Support/io.hoppscotch.desktop/your-domain.hoppscotch.storewhereyour-domainis the domain for the self-hosted instance.In this file, look for your access token under:
persistence.v1→access_token→data. Also thelogin_stateunder:persistence.v1→login_state→data.This will help us determine if the token is being stored correctly but not being properly utilized by the desktop app.
@brecht-vermeersch commented on GitHub (Mar 20, 2025):
I can confirm that the token is persisted.
@CuriousCorrelation commented on GitHub (Mar 21, 2025):
Hi @brecht-vermeersch, thanks for the confirmation. This is a very strange situation indeed, where we're hitting a code path in the auth flow where we get a valid token but fail to properly set the user state, that is -
access_tokenis stored correctly butlogin_stateisn't, wherelogin_stateis derived from the backend.I haven't been able to reproduce this issue in my testing environment, nor have seen similar reports from other self-hosted deployments with various config setups. This suggests we might be encountering an env-specific edge case in the auth flow.
Although I was able to artificially reproduce this by nullifying the backend response just before the check at:
github.com/hoppscotch/hoppscotch@86c0bb619d/packages/hoppscotch-selfhost-web/src/platform/auth/desktop/index.ts (L184)This is what I believe is happening:
access_tokenfrom the backendgetInitialUserDetails(), we're getting a response that doesn't trigger any of our error handling pathsres.data?.meisGettingInitialUser.value = falseThis would leave the app in a perpetual loading state, exactly as you're experiencing.
Would you be able to help confirm this theory? Could you please add a simple console.log statement to log the response structure in
setInitialUserfunction, aftergetInitialUserDetails()aroundgithub.com/hoppscotch/hoppscotch@86c0bb619d/packages/hoppscotch-selfhost-web/src/platform/auth/desktop/index.ts (L164-L167)Then once the new changes are up on the self-hosted instance, you can remove the old instance from the instance switcher by clicking the delete/trash icon, and re-add the new one. After that try to log in again and see what gets logged to the console. This would help us confirm the exact response shape that's causing the issue.
Thank you for your patience and help in diagnosing this issue!
@jdickel commented on GitHub (Mar 28, 2025):
The same behavior also occurred for a colleague of mine.
He's using Mac Desktop Client 25.2.3 while our on-prem instance is on 25.2.2.
My Desktop Client (Windows) 25.2.2 works fine.
@brecht-vermeersch commented on GitHub (Mar 28, 2025):
Tried running the desktop app locally, but after rebuilding the javascript, it always shows the old code.
Using the instructions in the desktop readme
@pankajmyt commented on GitHub (Mar 28, 2025):
got the latest version of linux/ubuntu. updated all individual containers. post login token, it keeps spinning
@lukasvslk commented on GitHub (Mar 31, 2025):
Hello, I am having the same problem.
Operating system: Windows 10
Desktop version: 25.3.0
I tried older version (25.2.3) and it works fine.
@hemantapkh commented on GitHub (Apr 3, 2025):
Same issue
@LordSimal commented on GitHub (Apr 5, 2025):
I can confirm, that the changes from the linked PR resolve this issue. With these changes, its possible to login to a self-hosted instance via the desktop app again.
@JakobStadlhuber commented on GitHub (Apr 9, 2025):
when will this be released?
@thermsdorff commented on GitHub (Apr 10, 2025):
Still can't login on self-hosted instance (after auth flow, loader spins until the end of time).
Windows 11
Version : 2025.3.1
No errors in console or in requests body
@JakobStadlhuber commented on GitHub (Apr 10, 2025):
can confirm still having the problem on macos
@CuriousCorrelation commented on GitHub (Apr 10, 2025):
Hi @JakobStadlhuber and @thermsdorff, this is quite strange, I'm unable to repro this on our internal deployment, and we have had confirmations that the changes in linked PR resolve this issue. Since you're still experiencing the problem, this might be related to specific deployment or environment configurations. Could you check if an "Auth response structure" log is present in the developer console when attempting to login?
@thermsdorff commented on GitHub (Apr 10, 2025):
@CuriousCorrelation
No "Auth response" in log but i got a 400 on graphql request :
@thermsdorff commented on GitHub (Apr 10, 2025):
Here the request payload :
Interesting fact, when i call by myself backend with same request it works !
@CuriousCorrelation commented on GitHub (Apr 10, 2025):
@thermsdorff It seems like
Content-Typeheader is missing from the request payload, could you please confirm if you're onv2025.3.1-0version of both the desktop app and the self-hosted instance? The desktop app release is out right now, you might have noticed a prompt for it, otherwise you can download the latest build from releases repo.Also heads up, the request url is visible in your second screenshot, you might want to remove or edit to anonymize it.
@CuriousCorrelation commented on GitHub (Apr 10, 2025):
Just a heads up to everyone experiencing this issue: For the fix to work properly, both your desktop app AND your self-hosted instance need to be on version
2025.3.1😄@thermsdorff commented on GitHub (Apr 10, 2025):
@CuriousCorrelation I confirm it works when you update to latest version for app AND backend.
Thank you for your time
@CuriousCorrelation commented on GitHub (Apr 10, 2025):
@thermsdorff Excellent 🚀 Glad I could help
@CuriousCorrelation commented on GitHub (Apr 11, 2025):
Hello everyone! Closing this issue as resolved - the problem was related to auth requests not specifying headers explicitly, which became necessary after changes to header handling in the platform code. The fix has been implemented in PR #4951 and released in version
v2025.3.1.Important note: Both the desktop app AND your self-hosted instance need to be updated to version
v2025.3.1or newer for the fix to work properly.Remember
access_tokencan become out of sync between browser and desktop app due to version mismatches. In such cases, you may need to clear instance data (remove + clear cache) and re-authenticate.If you're still having issues after syncing versions, please check the console logs for any "Auth response structure" messages or errors. Persistent issues are likely related to specific deployment environments or custom configurations - so feel free to continue in this thread with your environment details (OS, deployment method, proxy configurations) so we can help diagnose and consolidate information for others facing similar setup challenges.
Thanks to everyone for helping with diagnosing this issue!