microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.73k stars 28.43k forks source link

Can't sign into vscode.dev PWA on iOS #160330

Open jthoward64 opened 1 year ago

jthoward64 commented 1 year ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. "Install" vscode.dev as a PWA on iOS ("add to home screen" in safari)
  2. Click on Sign in to turn on setting sync
  3. Allow the pop up
  4. Sign in to GitHub/Microsoft (happens with both) if not signed in already (I am in the video)
  5. Pop-up closes
  6. PWA reloads, not signed in

The whole process: https://user-images.githubusercontent.com/29828269/188931228-f2cf44aa-cb13-4ac5-8984-cdf6bfb7bbff.MOV

The output log after (it is visible for a frame or two before the PWA reloads): image

None of the other log messages I managed to catch seemed of note

TylerLeonhardt commented 1 year ago

@tajetaje which version of iOS are you on? I can't seem to reproduce this issue. Also, can you try with insiders.vscode.dev PWA and tell me if this repros there as well?

jthoward64 commented 1 year ago

@tajetaje which version of iOS are you on? I can't seem to reproduce this issue. Also, can you try with insiders.vscode.dev PWA and tell me if this repros there as well?

15.6.1

And no, the issue is not present in insiders

TylerLeonhardt commented 1 year ago

Ok. We will have a new stable vscode.dev mid-next week. Let's wait for that and see if the issue persists. It's possible that it's a stable configuration issue so it might still repro... but let's see.

cc @joaomoreno

TylerLeonhardt commented 1 year ago

@tajetaje after the new stable... are you still seeing this?

jthoward64 commented 1 year ago

@tajetaje after the new stable... are you still seeing this?

Yes, still broken on stable, still working on insiders. Is there a maybe difference between how the manifest works between them? The "app" icon shows up as the VSCode icon for stable but uses screenshot for insiders.

P.S. The only weird thing about my device that I can think of is that it is under MDM, but none of the policies should affect this (just extra signing certificates, preinstalled apps, no device wipe, etc.)

TylerLeonhardt commented 1 year ago

Back from vacay... A release just went out today... I doubt that you're magically fixed though. I'm unable to repro on my iPad with vscode.dev stable unfortunately.

Couple things for you:

  1. does it work for you in Safari (not PWA version)?
  2. Could you do me a favor and hook up you iPad to a mac and get the contents of Dev Tools Console to see if anything weird is going on there?

Just in case, I'm guessing you tried removing and reinstalling the PWA.

VSCodeTriageBot commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

Lintonen-VHC commented 1 year ago

Can this be re-opened? I am still seeing this issue in 16.1.1 from both the PWA and when running in Safari. If I manually copy the login link into a new tab, it throws the below error.

Message: AADSTS900144: The request body must contain the following parameter: 'scope'.

jthoward64 commented 1 year ago

Can this be re-opened? I am still seeing this issue in 16.1.1 from both the PWA and when running in Safari. If I manually copy the login link into a new tab, it throws the below error.

Message: AADSTS900144: The request body must contain the following parameter: 'scope'.

yeah I don't have a Mac to get the logs, but if you can repro it then that works

Lintonen-VHC commented 1 year ago

Here is what I am seeing for errors. The Mac is an unmanaged device. The iPad is a managed device, so there could be security policies potentially in play here. I however, have been able to login in the past.

Console.txt

Network Log
jthoward64 commented 1 year ago

Here is what I am seeing for errors. The Mac is an unmanaged device. The iPad is a managed device, so there could be security policies potentially in play here. I however, have been able to login in the past.

Console.txt

Network Log

My iPad is also under MDM, so that may be the root cause. Here are the policies on my device, if one is the same across both then that could be it.

image image

Lintonen-VHC commented 1 year ago

I am not seeing any overlaps in the policies that would seem to be responsible for this. Below are mine.

Restrtictions 1

Restrtictions 2

jthoward64 commented 1 year ago

I am not seeing any overlaps in the policies that would seem to be responsible for this. Below are mine.

Restrtictions 1

Restrtictions 2

Are there any signing certificates that could be in conflict, I have 2 signing certificates, a CA, and a device certificate all from JAMF.

Lintonen-VHC commented 1 year ago

Are there any signing certificates that could be in conflict, I have 2 signing certificates, a CA, and a device certificate all from JAMF.

I have over a dozen of them but I'm not sure what I can share on that front because the company managing the device is a little overly and unreasonably protective. I can tell you that everything is managed by MobileIron though.

TylerLeonhardt commented 1 year ago

@Lintonen-VHC @tajetaje getting back from vacation.... I'm guessing it didn't magically resolve... Remind me again, this only fails for the VS Code stable PWA, yes? The Insiders PWA works fine... and not using the PWA and instead going to the website in Safari works fine too?

Lintonen-VHC commented 1 year ago

Apologies, I've been out of the office as well. In my case, it did magically resolve itself because my company swapped my iPad out for a new one and presto, no more issues. So apparently the workaround is to get yourself a new M2 iPad Pro :)

TylerLeonhardt commented 1 year ago

Good info regardless... I was using an M1 iPad Pro... not really sure how this could have any affect on this issue...but a data point nonetheless.

Lintonen-VHC commented 1 year ago

I think an MDM policy is probably involved here. Since I do contract work for a company that is very inconsistent at what policies they apply, and I jumped from an A series processor to an M series processor, I likely just got a different set of policies that are not causing a problem.

jthoward64 commented 1 year ago

@Lintonen-VHC @tajetaje getting back from vacation.... I'm guessing it didn't magically resolve... Remind me again, this only fails for the VS Code stable PWA, yes? The Insiders PWA works fine... and not using the PWA and instead going to the website in Safari works fine too?

Sorry, also been out, yes it was just the stable PWA, I'll check again tonight or tommorow

jthoward64 commented 1 year ago

@Lintonen-VHC @tajetaje getting back from vacation.... I'm guessing it didn't magically resolve... Remind me again, this only fails for the VS Code stable PWA, yes? The Insiders PWA works fine... and not using the PWA and instead going to the website in Safari works fine too?

Sorry, also been out, yes it was just the stable PWA, I'll check again tonight or tommorow

Same behavior confirmed ^ Can sign into both in safari, but only insiders as a PWA

Yes, still broken on stable, still working on insiders. Is there a maybe difference between how the manifest works between them? The "app" icon shows up as the VSCode icon for stable but uses screenshot for insiders.

It it probably unrelated but I am now getting the correct icon for the insiders PWA

TylerLeonhardt commented 1 year ago

@joaomoreno for some iPad users, it seems like the vscode.dev/redirect seems to work, but doesn't seem to trigger UriHandlers. I'm kinda at a loss for what can be done to debug this to see what the issue may be... any ideas?

jamwil commented 1 year ago

I’m experiencing this issue on stable vscode.dev; insiders.vscode.dev works as expected.

jthoward64 commented 1 year ago

@joaomoreno for some iPad users, it seems like the vscode.dev/redirect seems to work, but doesn't seem to trigger UriHandlers. I'm kinda at a loss for what can be done to debug this to see what the issue may be... any ideas?

I don't have a mac, but if anyone here does, and experiences this issue, they can try and use Apple's developer tools (web inspector) on iPadOS Safari