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.

next 9.5.2 Router not working on ionic webview

See original GitHub issue

Bug report

Describe the bug

When using v9.5.2 on ionic webview, next/router not working at all,

  • Router.push('/login')
  • <Link href="/login">

No error message No response to click

The ionic webview is using ionic://localhost/, maybe v9.5.2 unable to working on ionic://localhost/.

To Reproduce

I hope the description enough to explain where are the problem, It take time to create a demo repo, I will create it if must.

Expected behavior

  1. Universal links Using Router.push('/login') to redirect, Scan url QR code, auto open the app, then nothing happen. It should redirect.

  2. Link tag Click on the <Link>, then nothing happen. It should redirect.

Screenshots

image

System information

  • OS: iOS 13.6
  • Browser Safari Ionic Webview 5.0
  • Version of Next.js: 9.5.2
  • Version of Node.js: 12.16.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Cow258commented, Aug 23, 2020

probably because of

https://github.com/vercel/next.js/blob/5dbe0d0215bb9a02ce9f71b1d152640ec897c18b/packages/next/next-server/lib/router/utils/parse-relative-url.ts#L26

you don’t see any warnings in development?

I think you found the root of the problem. 👍🏻

Unfortunately, Here are no way to run development mode on mobile side, Required production static export for using ionic://localhost/ and run nextjs inside webview.

Maybe some way to export development static content, then I can able to test it on mobile.

Also, Development mode required using http://192.168.0.200 with same Wifi network to connect to dev server for remote debug on mobile side.

Also, Device log and console log didn’t show any error.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic WebView is showing blank page after build on iOS
I'm using ionic capacitor. After build, no external links are opening from the webview in iOS. There is no error or warning message...
Read more >
cordova-plugin-ionic-webview - npm package - Snyk
Ionic apps work better if the WKWebView is not scrollable, so the scroll is disabled by default, but can be enabled with this...
Read more >
CORS Errors: Cross-Origin Resource Sharing - Ionic Framework
CORS errors happen in web apps if requests are made and servers don't return required headers. Read about Cross-Origin Resource Sharing in Ionic...
Read more >
The 9 Most Common Mistakes That Ionic Developers Make
By reading the following Common mistakes, you will have the keys to avoiding fundamental problems and to create performant and scalable applications with...
Read more >
Ionic in Action | PDF | Web Application | Mobile App - Scribd
Angular and Cordova gotchas 191 Solutions to common issues □ ... User Device loads Cordova app WebView Angular Ionic. opens Cordova app wrapper...
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