7
5
Fork
You've already forked apple
1

client opens a second safari window when connecting to a server #588

Open
opened 2026年02月27日 14:32:56 +01:00 by douwe3998 · 15 comments

When you connect to a server, it will redirect you to your browser to login etc there. If you already have a safari window open, it will not add a tab there for that but it will redirect you there, at the same time a second safari window will be opened and you have to manually go there to continue logging in.

Steps to reproduce:

  • open a safari window
  • connect to a server
  • observe being redirected to your initial safari window but without a tab open
  • navigate back to your homescreen and observe that a second safari window was opened with your login tab
When you connect to a server, it will redirect you to your browser to login etc there. If you already have a safari window open, it will not add a tab there for that but it will redirect you there, at the same time a second safari window will be opened and you have to manually go there to continue logging in. Steps to reproduce: - open a safari window - connect to a server - observe being redirected to your initial safari window but without a tab open - navigate back to your homescreen and observe that a second safari window was opened with your login tab

This is from version 4.0.7 on macOS, and is by design because of ASWebAuthenticationSession. See #555.

This is from version 4.0.7 on macOS, and is by design because of `ASWebAuthenticationSession`. See #555.

I misread, this is a very weird issue @roopc

I misread, this is a very weird issue @roopc

Possibly related: #589

Possibly related: https://codeberg.org/eduVPN/apple/issues/589

Which Safari version, which macOS version @douwe3998 ?

Which Safari version, which macOS version @douwe3998 ?

Can't reproduce in macOS 15. It always opens a new "Safari" window just for authentication and it gets focus. Is it perhaps a macOS 26 bug?

Can't reproduce in macOS 15. It always opens a new "Safari" window just for authentication and it gets focus. Is it perhaps a macOS 26 bug?
Collaborator
Copy link

@douwe3998 This is the behaviour I see in macOS 26:

When there's no Safari open:

When there is a Safari window in the current space:

In both cases, the Safari window opened for authentication gets the focus, so I don't need to hunt around. Is the behaviour you see different from this?

I'm using macOS 26.0.1, Safari 26.0.1, eduVPN 4.0.7 (2309).

@douwe3998 This is the behaviour I see in macOS 26: When there's no Safari open: <video src="/attachments/25d63b49-990e-4958-8181-e01b7eddb011" title="safari_not_open" controls></video> When there is a Safari window in the current space: <video src="/attachments/692fbfd3-1083-4b15-9cf3-243d6f6f81f9" title="safari_open" controls></video> In both cases, the Safari window opened for authentication gets the focus, so I don't need to hunt around. Is the behaviour you see different from this? I'm using macOS 26.0.1, Safari 26.0.1, eduVPN 4.0.7 (2309).

macOS 26.3.1, eduVPN 4.0.7 (2309) works totally fine when Safari is the default browser.

  • If you already have Safari open, it is left alone and a new window opens and gets focus for the authentication/authorization, and after authentication/authorization it closes that window
  • If you have no Safari window open, it does open a new window just for the authentication/authorization that gets focus and closes nicely after authorization is complete
macOS 26.3.1, eduVPN 4.0.7 (2309) works totally fine when Safari is the default browser. * If you already have Safari open, it is left alone and a new window opens and gets focus for the authentication/authorization, and after authentication/authorization it closes that window * If you have no Safari window open, it does open a new window just for the authentication/authorization that gets focus and closes nicely after authorization is complete

I did notice a small issue when you set Chrome as your default browser and don't have Chrome running yet. It will also open a normal Chrome browser window behind the authentication/authorization window and leave it open after the authentication/authorization, but it will close the authn/authz window automatically.

I *did* notice a small issue when you set Chrome as your default browser and don't have Chrome running yet. It will *also* open a normal Chrome browser window _behind_ the authentication/authorization window and leave it open after the authentication/authorization, but it _will_ close the authn/authz window automatically.

When I open a Safari window and keep it in the same macOS space as the eduVPN app, then follow the steps to reproduce, the issue does not occur.

However, when I open Safari, switch it to fullscreen so it gets its own separate space, and then follow the same steps, the issue does occur.

I'm using:
-Default browser: Safari
-macOS: 26.1
-eduVPN: 4.0.7 (installed from the Mac App Store)

When I open a Safari window and keep it in the same macOS space as the eduVPN app, then follow the steps to reproduce, the issue does not occur. However, when I open Safari, switch it to fullscreen so it gets its own separate space, and then follow the same steps, the issue does occur. I'm using: -Default browser: Safari -macOS: 26.1 -eduVPN: 4.0.7 (installed from the Mac App Store)

I think that the window that got focus depends on what window had focus last.

Does trigger:

  • Open a safari window in a separate space
  • Connect to a server
  • Observe that the issue has been triggered

Doesn't trigger:

  • Open a safari window in a seperate space
  • Connect to a server and observe that the issue has been triggered
  • Connect to a server - Without going back to your original safari window
  • Observe that the issue has not been triggered
I think that the window that got focus depends on what window had focus last. Does trigger: - Open a safari window in a separate space - Connect to a server - Observe that the issue has been triggered Doesn't trigger: - Open a safari window in a seperate space - Connect to a server and observe that the issue has been triggered - Connect to a server - _Without going back to your original safari window_ - Observe that the issue has not been triggered
Collaborator
Copy link

I'm not able to reproduce the issue in macOS 26.0.1, even with Safari open in full-screen. When I click on the server in the eduVPN window, and then on "Continue", a separate Safari window is opened for auth, and the full-screen Safari window does not get focus.

Additionally, I tried it with Safari on full-screen, and connecting using the status menu, and it works fine there as well.

@fkooman Are you able to reproduce the problem with a full-screen Safari? (To do that, open Safari, and the top-left of the window, you'll see red-orange-green button, click on the green button, which will make it go full screen, then do a Control+left, or three-finger swipe left, and you will be back at the desktop. Open the eduVPN app from there, and add / connect to a server.)

I'm not able to reproduce the issue in macOS 26.0.1, even with Safari open in full-screen. When I click on the server in the eduVPN window, and then on "Continue", a separate Safari window is opened for auth, and the full-screen Safari window does not get focus. Additionally, I tried it with Safari on full-screen, and connecting using the status menu, and it works fine there as well. @fkooman Are you able to reproduce the problem with a full-screen Safari? (To do that, open Safari, and the top-left of the window, you'll see red-orange-green button, click on the green button, which will make it go full screen, then do a Control+left, or three-finger swipe left, and you will be back at the desktop. Open the eduVPN app from there, and add / connect to a server.)

@roopc I followed your instructions on macOS 26.3.1 and can't reproduce either. Everything works fine with Safari open full screen in a separate "space". I get a new Safari window that opens on the same "space" as the eduVPN app and it doesn't interfere at all with the Safari open in the other space.

@roopc I followed your instructions on macOS 26.3.1 and can't reproduce either. Everything works fine with Safari open full screen in a separate "space". I get a new Safari window that opens on the same "space" as the eduVPN app and it doesn't interfere at all with the Safari open in the other space.
Collaborator
Copy link

@douwe3998 If I pause the video you had captured, I can see that the ASWebAuth window has opened before the screen moves to the full-screen Safari. I'm not sure what causes the move.

Screenshot 2026年03月17日 at 9.59.48 AM

Can you try moving the full-screen Safari to some other space -- maybe a few spaces to the right (or left) of the eduVPN window's space, and observe if the behaviour is different?

@douwe3998 If I pause the video you had captured, I can see that the ASWebAuth window has opened before the screen moves to the full-screen Safari. I'm not sure what causes the move. ![Screenshot 2026年03月17日 at 9.59.48 AM](/attachments/c7f09530-3b1e-433d-bddd-181ed0ad94d4) Can you try moving the full-screen Safari to some other space -- maybe a few spaces to the right (or left) of the eduVPN window's space, and observe if the behaviour is different?

@roopc Did you also put focus on the full-screen safari window before attempting to connect? so that the last safari window that had focus was the full-screen and not an ASWebAuth window from a previous connect.

@roopc Did you also put focus on the full-screen safari window before attempting to connect? so that the last safari window that had focus was the full-screen and not an ASWebAuth window from a previous connect.

At which point are we chasing Apple bugs? 😆

At which point are we chasing Apple bugs? 😆
Sign in to join this conversation.
No Branch/Tag specified
master
use_common_api
issue_eduvpn_apple_527
developer_id_distribution
internal-3.0.4-i
debug/debug_block_local
bugfix/376
feature/tests
bump-versions
experimental
fix-swiftlint-warnings
redesign
mergetest
feature/289
use-gplv3-with-app-store-exception
release/2.1.7
tunnelkit_keep_tunnel_when_network_is_down
feature/254
feature/includeall
4.1.6
4.1.5
4.1.4
4.1.3
4.1.2
4.1.1
4.1.0
4.0.7
4.0.6
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.1.0
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.9
2.1.7
release/lets-connect-2.1.7-mac
release/lets-connect-2.1.7-ios
ios/v.2.0.1
ios/v2.0.2
ios/v2.0.3
ios/v2.0.4
ios/v2.1.1
mac/v2.1.1
v2.0.4
v2.0.2
v2.0.3
v2.0.0
v2.0.1
v1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eduVPN/apple#588
Reference in a new issue
eduVPN/apple
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?