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

Crash inside [WKWebView loadData:MIMEType:characterEncodingName:baseURL:] #89

Closed
1 of 4 tasks
nalexn opened this issue Feb 16, 2024 · 6 comments
Closed
1 of 4 tasks
Labels
bug Something isn't working

Comments

@nalexn
Copy link

nalexn commented Feb 16, 2024

Describe the bug

SDK crash

Integration Method

  • SPM (iOS)
  • Cocoapods (iOS)
  • Direct Download (iOS)
  • GMaven (Android)

SDK Version
18.4.1

To Reproduce

Unknown

Xcode version for iOS (please complete the following information):

  • Xcode 15.2

Device (please complete the following information):

  • Various devices, iOS 17, iOS 16

Add any other context about the problem here.

EXC_BREAKPOINT: KERN_INVALID_ADDRESS

0  WebKit +0x4c78                  WTFCrashWithInfo(int, char const*, char const*, int)
1  WebKit +0x722424                WebKit::WebProcessPool::pageEndUsingWebsiteDataStore(WebKit::WebPageProxy&, WebKit::WebsiteDataStore&)
2  WebKit +0x72c8fc                WebKit::WebProcessProxy::removeWebPage(WebKit::WebPageProxy&, WebKit::WebProcessProxy::EndsUsingDataStore)
3  WebKit +0x6bfa10                WebKit::WebPageProxy::launchProcess(WebCore::RegistrableDomain const&, WebKit::WebPageProxy::ProcessLaunchReason)
4  WebKit +0x6c4ac0                WebKit::WebPageProxy::loadData(std::__1::span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&, WTF::String const&, WTF::String const&, API::Object*, WebCore::ShouldOpenExternalURLsPolicy)
5  WebKit +0x39a2bc                -[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]
6  OPCoreServices +0x928b20        eIRO5Vdm.lUjPgPcG(pDrEJCxz:qeKfDafo:)
7  OPCoreServices +0x931ef4        gu1yWU2E.p1DeDT1X(pDrEJCxz:qeKfDafo:)
8  OPCoreServices +0x92dc40        closure #1 in trsOYNzb.webViewWebContentProcessDidTerminate(_:)
9  OPCoreServices +0x925ad8        closure #1 in pjDdaVGx.t5ajCXpG(url:yknbnetv:siteKey:tMOFpA5Q:completionHandler:)
10 OPCoreServices +0x92844c        partial apply for closure #1 in pjDdaVGx.t5ajCXpG(url:yknbnetv:siteKey:tMOFpA5Q:completionHandler:)
11 OpenPhoneCoreServices +0x9285f0 specialized pjDdaVGx.gJUJkqet(dataNullable:urlResponse:error:completionHandler:)
12 OpenPhoneCoreServices +0x90651c thunk for @escaping @callee_guaranteed @Sendable (@guaranteed Data?, @guaranteed NSURLResponse?, @guaranteed Error?) -> ()
13 CFNetwork +0xf284               0x188e5c284 (0x188e5c0a4 + 480)
14 CFNetwork +0x2d188              0x188e7a188 (0x188e7a0ec + 156)
15 libdispatch.dylib +0x26a4       __dispatch_call_block_and_release
16 libdispatch.dylib +0x42fc       __dispatch_client_callout
17 libdispatch.dylib +0xb890       __dispatch_lane_serial_drain
18 libdispatch.dylib +0xc3f4       __dispatch_lane_invoke
19 libdispatch.dylib +0x17000      __dispatch_root_queue_drain_deferred_wlh
20 libdispatch.dylib +0x16874      __dispatch_workloop_worker_thread
21 libsystem_pthread.dylib +0x1960 __pthread_wqthread
@nalexn nalexn added the bug Something isn't working label Feb 16, 2024
@walterjgsp
Copy link
Collaborator

walterjgsp commented Feb 16, 2024

Hi @nalexn, thanks for the report. What's the version of the SDK that you're using? 18.4.1?

@nalexn
Copy link
Author

nalexn commented Feb 16, 2024

Yes, 18.4.1 for iOS

@walterjgsp
Copy link
Collaborator

Thanks @nalexn, here are some follow up questions that will help us investigate.

Are you seeing this on production or development? How often does it happen?

@nalexn
Copy link
Author

nalexn commented Feb 16, 2024

This is production, repro steps are unknown. 100% of the crashes happen when the app is backgrounded. There are some instances when the app received a background fetch request and was activated prior to crashing. However, most of the logs indicate the crash doesn't happen immediately after app launch, user manages to navigate in the app for some time and minimizes the app. But I cannot see a pattern, user paths seem random and don't have much in common.

We've made a release with this SDK version yesterday, currently at 1% rollout, but this crash is already top 1 (#88 is on second place) in the list.

@walterjgsp
Copy link
Collaborator

We have released version 18.4.2, which should address the issue. Please let us know if you continue to experience errors.

@walterjgsp
Copy link
Collaborator

By #90 this bug should be solved in the version 18.4.2. Please reopen the bug if this issue appears in the new version of the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants