question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Platform opening URL's externally on safari after reconnecting to internet

See original GitHub issue

Bug Report

Problem

After upgrading from cordova-ios@5.1.1 to cordova-ios@^6.0.0, apps that connect to a Firebase Realtime DB start opening long polling URL’s externally on safari after reconnecting to the internet, moving the user away from the app into a meaningless URL page. Currently we can only attribute this to the platform changes starting with 6.0.0, since this behaviour is not present on 5.1.1.

recon

What is expected to happen?

Firebase long polling (and possibly other) requests performed on the background should not be randomly catched and opened externally on safari, confusing and moving the user away from the app.

What does actually happen?

When reconnecting, the app opens the system safari browser with a random meaningless URL for the user, such as https://{x}.firebaseio.com/.lp?dframe=t&id={x}&pw={x}&ns={x}

Information

This can be reproduced on an ionic fresh starter app with cordova and minimal firebase configuration to load data from Firebase Realtime DB.

  1. Install and open the app on a real device
  2. Disconnect from internet - firebase wont be able to use websockets and fall back to long polling requests and retries
  3. Connect to the internet - behaviour seen on .gif above

Currently, downgrading to cordova-ios@5.1.1 seems to be a way to stop the behaviour. Also noticed the new feature Add preference for webview window handling which could be related to this, but issue is present already in version 6.0.0. Setting up the AllowNewWindows preference doesn’t produce any effect on this bug.

Command or Code

Example of minimal cordova setup to replicate, used in a fresh ionic started app :

"cordova-ios": "^6.1.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",

Environment, Platform, Device

Seen on real iPhone device with iOS 13.7.

Version information

Ionic ^5; Cordova ^10 CLI; cordova-ios@^6.0.0 platform; Xcode Version 11.7 (11E801a);

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:11
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
x140l31commented, Feb 2, 2021

We are still facing this issue in 6.1.1.

Looks good in 6.2.0

1reaction
amjadyahya1commented, Nov 26, 2020

I have tested it… and can confirm that this bug has been fixed, it no longer opens an external url.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Safari won't open any links and then free… - Apple Community
HELP! The Safari on my fairly new iphone 6s has gone haywire. Safari opens fine, and if you type in a direct URL,...
Read more >
debugging - Safari Web inspector keeps disconnecting
Open the iPhone simulator in Xcode and debug there with Safari Web Inspector. ... After the safari update the web inspector opens and...
Read more >
iOS Device Profiles - VMware Docs
Using the following basic steps you can configure any iOS profile in the Workspace ONE UEM. Explore the available settings for each profile ......
Read more >
Apple iOS User Guide for Cisco AnyConnect Secure Mobility ...
To ensure proper establishment of Connect On-Demand VPN tunnels after updating AnyConnect, users must manually start the AnyConnect app and ...
Read more >
How do I test for connectivity issues? - Kahoot Support
This checks that you have sufficient internet speed. It will let you know roughly how many players can connect to your game before...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found