Closed stefanb closed 7 months ago
Cannot reproduce on Chromium on Ubuntu Cannot reproduce on Chrome 121.0.06167.185 and 123.0.63112.86 on Windows 10 (in a VM)
Is this still an issue for you? Do you have any output from the console?
I noticed the problem a few weeks ago when trying the app again after a long time (a year?) and has been occurring since. Chrome on macOS.
Errors in console:
Question: is it intended for OSM login to be opened in a new browser tab? Imo that is causing the problem closing the login tab and getting back to mapcomplete app.
No, the login page is supposed to load in the same tab. Can you try hitting Ctrl+F5 before logging in to force a full reload?
Reloaded the page without cache (shift+cmd+R on macOS) produced the same result - opening the login page in new tab.
In console i could see the "Trying to log in..." and a few requests to https://mapcomplete.org/assets/...
Even manually clearing site data in developer console made no changes - the OSM login page still opened in new tab.
Observed this on Chromes on two different Macs.
I should also add, that I am not seeing other websites opening new tabs on a whim.
No such problem on Windows 10 when using same account (providing same set of browser extensions to rule those out).
Tried also with a guest profile in Chrome on macOS and experienced the same problem. No problem on mobile Chrome on Android, nor in Safari on macOS. REPRODUCED on Edge on macOS!
To summarize:
OS | Browser | CPUs | Login | note |
---|---|---|---|---|
macOS | Firefox | arm64/M1,M2 | ✅Works | 2 separate macbooks |
macOS | Safari | arm64/M1,M2 | ✅Works | 2 separate macbooks |
macOS | Edge | arm64/M2 | 🛑 Fails | different user profile, disabled both extensions (common with chrome was ublock origin) |
macOS | Chrome | arm64/M1,M2 | 🛑 Fails | 2 separate macbooks, profile with extensions, incognito, guest profile with no extensions, opens new tab |
Windows | Chrome | x86-64/Ryzen 5 | ✅Works | tried with same set of plugins as on macOS |
Android | Chrome | arm64-v8a | ✅Works | phone |
Android | Opera | ✅Works | phone | |
iOS | Safari | ✅Works | phone | |
iOS | Edge | ✅Works | phone | |
Windows | Edge | ✅Works | ||
Windows | Firefox | ✅Works |
Just tested with a virtual machine running MacOS 11.7.10 with Google Chrome 123.0.6312; where I cannot reproduce this issue.
I'm gonna update the VM tonight, when I have decent internet.
With the help of local OSM community I have added a few more tested browser / OS combinations to the matrix above, all without problems.
I suspect that it wrongly sets the singlepage
parameter when setting up the authentication
Spec at https://github.com/osmlab/osm-auth says:
singlepage
- Iftrue
, use page redirection instead of a popup (default:false
)
Interestingly, test on https://osmlab.github.io/osm-auth/ opens new tab in my chrome and then closes it, but in Firefox it opens a popup window and then closes it. In both cases the login succeeds.
It also works in both Firefox and Chrome on https://osmlab.github.io/osm-auth/ if i choose the "single page" checkbox, without opening any tabs or popup windows.
I've enabled 'single page' mode in all cases on dev.mapcomplete.org
. Would you mind testing there?
Yay, it works in both Chrome and Edge on macOS where it previously failed 🎉 🥳 But of course other browsers should be tested too. Thanks for setting up the test!
Works also in Firefox, but haven't tested in iframe (is this legit use case or should it escape iframes?) nor PWA.
Possibly related to the osm.org login / authorization page being opened in a new tab, which isn't closed and just keeps reloading authorization page when clicking the authorize button. It behaves the same in incognito mode.
In Firefox it works fine and there the osm.org login / authorize page is opened in the same browser tab.