Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo doesn't work below iOS 16.4 #208

Closed
careilly opened this issue May 9, 2024 · 5 comments
Closed

Demo doesn't work below iOS 16.4 #208

careilly opened this issue May 9, 2024 · 5 comments

Comments

@careilly
Copy link

careilly commented May 9, 2024

(And neither does my app, which is my real problem - only tried it with the demo because I wanted to see if I could isolate what was going on.)

On building the demo and launching it into the simulator on versions below 16.4 I get the following screen:

Simulator Screenshot - iPhone 12 15 5 - 2024-05-09 at 15 40 45

and the following log. It works on 16.4+

2024-05-09 15:27:03.210028+0100 Turbo Demo[20520:5011767] [ViewportSizing] maximumViewportInset cannot be larger than frame
2024-05-09 15:27:03.210089+0100 Turbo Demo[20520:5011767] [ViewportSizing] minimumViewportInset cannot be larger than frame
2024-05-09 15:27:03.226637+0100 Turbo Demo[20520:5011767] [ViewportSizing] maximumViewportInset cannot be larger than frame
2024-05-09 15:27:03.226701+0100 Turbo Demo[20520:5011767] [ViewportSizing] minimumViewportInset cannot be larger than frame
2024-05-09 14:27:03 +0000 [Session] visit ["location": https://turbo-native-demo.glitch.me, "reload": false, "options": Turbo.VisitOptions(action: Turbo.VisitAction.replace, response: nil)]
2024-05-09 14:27:03 +0000 [ColdBootVisit] startVisit https://turbo-native-demo.glitch.me [:]
2024-05-09 15:27:03.270309+0100 Turbo Demo[20520:5011767] [Strada] bridgeDestinationViewDidLoad: https://turbo-native-demo.glitch.me
2024-05-09 15:27:03.270525+0100 Turbo Demo[20520:5011767] [Strada] bridgeDestinationViewWillAppear: https://turbo-native-demo.glitch.me
2024-05-09 15:27:03.310252+0100 Turbo Demo[20520:5011767] [Strada] bridgeDestinationViewDidAppear: https://turbo-native-demo.glitch.me
2024-05-09 14:27:34 +0000 [Bridge] ← pageLoad
Failed ["timestamp": 1715264854086] [:]
2024-05-09 14:27:34 +0000 [ColdBootVisit] cancelVisit https://turbo-native-demo.glitch.me [:]

Nothing in that log says anything relevant to me and I don't see how it's related to the .inspectable change in 16.4.

Xcode Version 15.3 (15E204a)

@careilly
Copy link
Author

And the problem is that the demo doesn't include the es-module-shims needed to make it work on older Safari or WebViews.

Neither did my web app, which has been upgraded over several versions of Rails/Turbolink/Turbo.

@joemasilotti
Copy link
Member

Thanks for the report! Feel free to open a PR that adds the shims to the demo app.

@joemasilotti joemasilotti closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
@udit-ltim
Copy link

udit-ltim commented Aug 16, 2024

Hi @careilly , I am also facing the same issue. Can you please help me with steps to fix this.

I am using Xcode 15.4 and trying to run on Simulator iPhone 15 , 17.2.

Simulator Screenshot - iPhone 15 - 2024-08-16 at 11 08 53

Console Logs -

Failed to resolve host network app id

[Session] visit ["options": Turbo.VisitOptions(action: Turbo.VisitAction.replace, response: nil), "reload": false, "location": https://turbo-native-demo.glitch.me?turbolinks=1]

[ColdBootVisit] startVisit https://turbo-native-demo.glitch.me?turbolinks=1 [:]
bridgeDestinationViewDidLoad: https://turbo-native-demo.glitch.me?turbolinks=1
bridgeDestinationViewWillAppear: https://turbo-native-demo.glitch.me?turbolinks=1
bridgeDestinationViewDidAppear: https://turbo-native-demo.glitch.me?turbolinks=1
0x104810a18 - [pageProxyID=6, webPageID=7, PID=21387] WebPageProxy::didFailProvisionalLoadForFrame: frameID=1, isMainFrame=1, domain=NSURLErrorDomain, code=-1202, isMainFrame=1, willInternallyHandleFailure=0

@joemasilotti Is there any any PR for the fix?

@careilly
Copy link
Author

careilly commented Aug 16, 2024

Whoops, this fell off my radar.

You need to make sure you include the shims in the layout your app is using.

<script async src="https://ga.jspm.io/npm:es-module-shims@1.8.2/dist/es-module-shims.js" data-turbo-track="reload"></script>

Was the quick fix I used at the time.

But that doesn't look like the same issue - you're having a certificate or proxy problem, not a lack of shims.

@udit-ltim
Copy link

udit-ltim commented Aug 16, 2024

Thanks @careilly .

So I will not be able to test the demo App. Right? As I can not make the changes on the web part of this demo app which is using https://turbo-native-demo.glitch.me/?turbolinks=1
I have to create my own app in order to test and play with it?

Or is there a way I can run the demo App...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants