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

Keep being unable to render the webview with this error #51

Closed
34code opened this issue Dec 1, 2024 · 9 comments
Closed

Keep being unable to render the webview with this error #51

34code opened this issue Dec 1, 2024 · 9 comments

Comments

@34code
Copy link

34code commented Dec 1, 2024

I have a tabbed app, and am continuously getting the following error on load:

Failed to resolve host network app id to config: bundleID: com.apple.WebKit.Networking instance ID: Optional([_EXExtensionInstanceIdentifier: E4ED32DE-2380-44CF-A3F4-29B4D5AE083F])

I've tried setting the userAgent to a custom user agent (described here: https://forums.developer.apple.com/forums/thread/762223) and still no luck.. I'm running iOS 18.1 and tested on 18.1 and 18.2

@34code
Copy link
Author

34code commented Dec 1, 2024

More context:

This is an existing project which stopped working after updating to Sequoia 15.2. It was working before on Sonoma. The hotwire-native-ios still works out of the box, but my existing app stopped working.

@joemasilotti
Copy link
Member

That error shouldn't cause the web view to fail. Is your server receiving the request? What's the response code?

@34code
Copy link
Author

34code commented Dec 2, 2024

Yes server (when I set to "local") is receiving the request. However it does not return a 500 code but the app still believes an error occurred and gives this message for all tabs.

Screenshot 2024-12-01 at 4 45 05 PM

Here is a screenshot of the logs while building the app in simulator:

Screenshot 2024-12-01 at 4 46 17 PM

@34code
Copy link
Author

34code commented Dec 2, 2024

full error log just now running it against "local".

[Session] visit ["reload": false, "location": http://localhost:3002/m, "options": HotwireNative.VisitOptions(action: HotwireNative.VisitAction.advance, response: nil)]
[ColdBootVisit] startVisit http://localhost:3002/m
[Session] visit ["reload": false, "location": http://localhost:3002/m/ask, "options": HotwireNative.VisitOptions(action: HotwireNative.VisitAction.advance, response: nil)]
[ColdBootVisit] startVisit http://localhost:3002/m/ask
[Session] visit ["location": http://localhost:3002/m/orders, "options": HotwireNative.VisitOptions(action: HotwireNative.VisitAction.advance, response: nil), "reload": false]
[ColdBootVisit] startVisit http://localhost:3002/m/orders
[Session] visit ["location": http://localhost:3002/m/profile, "reload": false, "options": HotwireNative.VisitOptions(action: HotwireNative.VisitAction.advance, response: nil)]
[ColdBootVisit] startVisit http://localhost:3002/m/profile
[Bridge] bridgeDestinationViewDidLoad: http://localhost:3002/m
[Bridge] bridgeDestinationViewWillAppear: http://localhost:3002/m
Failed to request storage access quirks from WebPrivacy.
Failed to request storage access user agent string quirks from WebPrivacy.
[Bridge] bridgeDestinationViewDidAppear: http://localhost:3002/m
WebContent process (0x112018c40) took 1.027111 seconds to launch
WebContent process (0x112019200) took 1.116318 seconds to launch
WebContent process (0x1120197c0) took 1.282586 seconds to launch
WebContent process (0x112019d80) took 1.362063 seconds to launch
WebContent process (0x11201a340) took 1.460815 seconds to launch
WebContent process (0x11201a900) took 1.569177 seconds to launch
Failed to resolve host network app id to config: bundleID: com.apple.WebKit.Networking instance ID: Optional([_EXExtensionInstanceIdentifier: E504AC15-779C-49AB-894E-8EB09E2D9954])
WebContent process (0x11201aec0) took 1.648233 seconds to launch
WebContent process (0x11201b480) took 1.742717 seconds to launch
Networking process (0x112036b00) took 1.602770 seconds to launch
Failed to request query parameters from WebPrivacy.
Failed to request restricted opener domains from WebPrivacy
Failed to request allowed query parameters from WebPrivacy.
Failed to request allowed query parameters from WebPrivacy.
Error creating the CFMessagePort needed to communicate with PPT.
[Bridge] bridgeDestinationViewDidLoad: http://localhost:3002/m/ask
[ColdBootVisit] failVisit h

Screenshot 2024-12-01 at 5 05 32 PM

@joemasilotti
Copy link
Member

It looks like you either a) don't have Turbo.js exposed on server or b) are getting a 406. Can you share the server logs?

@34code
Copy link
Author

34code commented Dec 3, 2024

How do I check if Turbo.js is exposed on the server? Here are the server logs.. it says completed 200 OK..

18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a] Started GET "/m" for ::1 at 2024-12-02 18:04:22 -0800
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a] Processing by MobileController#home as HTML
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   MvCatComAllStores Load (3.8ms)  SELECT "mv_cat_com_all_stores".* FROM "mv_cat_com_all_stores" /*action='home',application='Botflip',controller='mobile'*/
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   ↳ app/controllers/mobile_controller.rb:182:in `sort_by'
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   MvCatComWalmart Load (1.4ms)  SELECT "mv_cat_com_walmarts".* FROM "mv_cat_com_walmarts" /*action='home',application='Botflip',controller='mobile'*/
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   ↳ app/controllers/mobile_controller.rb:202:in `sort_by'
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   Rendering layout app/views_mobile/layouts/mobile.html.erb
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   Rendering app/views_mobile/mobile/home.html.erb within layouts/mobile
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   Rendered app/views_mobile/mobile/home.html.erb within layouts/mobile (Duration: 0.7ms | GC: 0.0ms)
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a]   Rendered layout app/views_mobile/layouts/mobile.html.erb (Duration: 8.1ms | GC: 3.8ms)
18:04:22 web.1  | [ed3b04ad-96a0-41d5-8176-ed3a62f6824a] Completed 200 OK in 103ms (Views: 8.9ms | ActiveRecord: 5.2ms (2 queries, 0 cached) | GC: 4.9ms)
18:04:22 web.1  |
18:04:22 web.1  |
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3] Started GET "/fp?fp=963702546&b=undefined&d=undefined&o=undefined&sr=393x852&c=undefined&ua=BotFlip%20App:%20iOS" for ::1 at 2024-12-02 18:04:23 -0800
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3] Processing by ApplicationController#grab_fingerprint as */*
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   Parameters: {"fp"=>"963702546", "b"=>"undefined", "d"=>"undefined", "o"=>"undefined", "sr"=>"393x852", "c"=>"undefined", "ua"=>"BotFlip App: iOS"}
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   Fingerprint Load (203.0ms)  SELECT "fingerprints".* FROM "fingerprints" WHERE "fingerprints"."fingerprint" = '963702546' ORDER BY "fingerprints"."id" ASC LIMIT 1 /*action='grab_fingerprint',application='Botflip',controller='application'*/
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   ↳ app/controllers/application_controller.rb:275:in `grab_fingerprint'
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   TRANSACTION (187.5ms)  BEGIN /*action='grab_fingerprint',application='Botflip',controller='application'*/
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   ↳ app/controllers/application_controller.rb:277:in `grab_fingerprint'
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   Account Load (384.8ms)  SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = 0 LIMIT 1 /*action='grab_fingerprint',application='Botflip',controller='application'*/
18:04:23 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   ↳ app/controllers/application_controller.rb:277:in `grab_fingerprint'
18:04:24 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   TRANSACTION (192.6ms)  ROLLBACK /*action='grab_fingerprint',application='Botflip',controller='application'*/
18:04:24 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   ↳ app/controllers/application_controller.rb:277:in `grab_fingerprint'
18:04:24 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   Rendering application/grab_fingerprint.html.erb
18:04:24 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3]   Rendered application/grab_fingerprint.html.erb (Duration: 0.1ms | GC: 0.0ms)
18:04:24 web.1  | [a44dfb76-c306-467e-b8e2-d3b05ab971e3] Completed 200 OK in 863ms (Views: 0.4ms | ActiveRecord: 967.8ms (2 queries, 0 cached) | GC: 0.3ms)
18:04:24 web.1  |
18:04:24 web.1  |

@34code
Copy link
Author

34code commented Dec 3, 2024

I'm going to try modifying a vanilla hotwire-native-ios app and point it to my server and report back if any errors are found.

@joemasilotti
Copy link
Member

Logs look OK! You could try Turbo in the web debug console and see what happens.

@34code
Copy link
Author

34code commented Dec 3, 2024

You were right! It is indeed turbo not loading.. something amiss in my importmaps.. Will try to figure out how to get it back... Thanks for pointing me in the right direction!

@34code 34code closed this as completed Dec 3, 2024
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

2 participants