A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
3.27k
stars
1.61k
forks
source link
[Crash][iOS] Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value #2368
Open
riskteria opened 1 week ago
Is there an existing issue for this?
Current Behavior
Crash when open app after archiving with
debug
flagflutter build ipa --debug -t lib/main.dart --export-method=app-store
But the app went well when:
flutter run --debug
release
flag:flutter build ipa --release -t lib/main.dart
Expected Behavior
The app should be open normally without any crashes.
Steps with code example to reproduce
Steps with code example to reproduce
```dart import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:url_launcher/url_launcher.dart'; import 'models/main.dart'; const CRISP_BASE_URL = 'https://go.crisp.chat'; String _crispEmbedUrl({ required String websiteId, required String locale, String? userToken, }) { String url = CRISP_BASE_URL + '/chat/embed/?website_id=$websiteId'; url += '&locale=$locale'; if (userToken != null) url += '&token_id=$userToken'; return url; } /// The main widget to provide the view of the chat class CrispView extends StatefulWidget { /// Model with main settings of this chat final CrispMain crispMain; /// Set to true to have all the browser's cache cleared before the new WebView is opened. The default value is false. final bool clearCache; final void Function(String url)? onLinkPressed; ///Set to true to make the background of the WebView transparent. ///If your app has a dark theme, ///this can prevent a white flash on initialization. The default value is false. final bool transparentBackground; @override _CrispViewState createState() => _CrispViewState(); CrispView({ required this.crispMain, this.clearCache = false, this.onLinkPressed, this.transparentBackground = false, }); } class _CrispViewState extends StateStacktrace/Logs
Stacktrace/Logs
``` Incident Identifier: 51042A90-D5D8-4753-A3B9-FDC92C6D9682 Distributor ID: com.apple.TestFlight Hardware Model: iPhone15,3 Process: Runner [86714] Path: /private/var/containers/Bundle/Application/FD4E895E-E4CC-49F6-8789-DA7606D01FD5/Runner.app/Runner Identifier: com.dgw.solution.dev Version: 3.1.1 (117) AppStoreTools: 16B39 AppVariant: 1:iPhone15,3:18 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.dgw.solution.dev [25594] Date/Time: 2024-10-24 09:03:07.1366 +0700 Launch Time: 2024-10-24 09:03:06.6479 +0700 OS Version: iPhone OS 18.0 (22A3354) Release Type: User Baseband Version: 3.02.08 Report Version: 104 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x000000010559fe14 Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Terminating Process: exc handler [86714] Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 flutter_inappwebview_ios 0x000000010559fe14 Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value + 0 (/Flutter version
Flutter 3.24.0 • Dart 3.5.0 • DevTools 2.37.2
Operating System, Device-specific and/or Tool
Plugin version
v6.1.5
Additional information
No response
Self grab