報錯信息:The Dart VM Service was not discovered after 30 seconds. This is taking much longer than expected...
基本情況:
硬件:mac(15.3.1),iPad(iOS 16.6),iPhone 16 pro(iOS 18.4)
項目環境
flutter:3.16.9
dart:3.2.6
今天把Xcode升級到16.3,(升級之前無任何問題)
使用Xcode運行Flutter項目iPad(iOS 16.6),iPhone 16 pro(iOS 18.4)兩個設備都沒有任何問題
使用Android studio運行Flutter項目
在iPhone 16 pro(iOS 18.4)沒有任何問題
但是在iPad(iOS 16.6)下報錯(如下圖),雖然項目能跑起來 但是控制臺沒有任何的print內容,有沒有遇到這種情況的,在github上也沒找到個所以然
嘗試過程:
flutter clean: 無用
flutter run --host-vmservice-port=12345:無用
切換flutter 3.24.5 :無用
修改setting-Dart中的Webdev server port :無用
重啟大法:無用
搜到的其他亂七八糟的操作:無用
Launching lib/main.dart on 123456 in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 346QFZZACH
Running Xcode build...
Xcode build done. 44.6s
Installing and launching...
The Dart VM Service was not discovered after 30 seconds. This is taking much longer than expected...
(lldb) process interrupt
[ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend.
注冊異常保護范圍=>0x10154cf18, 0x10154ec34
注冊異常保護范圍模塊=>AliyunIdentityPlatform
注冊異常保護范圍=>0x101546240, 0x101546c54
注冊異常保護范圍模塊=>AliyunIdentityCenter
[IFLYTEK] login with params:appid=8d48a2d7
[IFLYTEK] -[IFlySpeechUtility login],login=0
[] nw_path_necp_check_for_updates Failed to copy updated result (22)
設備指紋初始化,結果 10000
初始化成功,后續可以正常調用getSession接口
[IFLYTEK] +[IFlySystemInfo getWorkPath],_gMscLogPath=(null)
[IFLYTEK] +[IFlyReachability currentReachabilityStatus][IN]
[IFLYTEK] -[IFlyReachability networkStatusForFlags:][IN]
[IFLYTEK] Reachability Flag Status: -R ------- networkStatusForFlags
[IFLYTEK] -[IFlyReachability networkStatusForFlags:][OUT]
[IFLYTEK] -[IFlyReachability dealloc][IN]
[IFLYTEK] -[IFlyReachability stopNotifier][IN]
[IFLYTEK] -[IFlyReachability stopNotifier][OUT]
[IFLYTEK] -[IFlyReachability dealloc][OUT]
[IFLYTEK] +[IFlyReachability currentReachabilityStatus][OUT]
[IFLYTEK] +[IFlySystemInfo getCarrierName][IN]
[IFLYTEK] +[IFlySystemInfo getCarrierName][OUT]
[IFLYTEK] login -[IFlyLoginParam toString:] SessionParam:timeout=20000,appid=8d48a2d7,msc.ver=1.0.1227.1180,openudid=1db54580aad8553760ffb8dceab96914d16136a9,work_dir=/var/mobile/Containers/Data/Application/214518F6-0EFF-436C-8619-9FBC90CD6130/Library/Caches,carrier=,os.system=iPadOS,os.release=16.6,os.version=16.6,os.model=iPad12.1,os.resolution=750*1334,os.manufact=apple,os.jailbreak=0,app.name=北麒AI店長,app.path=/private/var/containers/Bundle/Application/271C96B6-7913-4B8B-936F-22CF03A10652/Runner.app,app.pkg=Runner.app,app.bid=com.example.sdmm.flutter.store,net_type=wifi,appid=8d48a2d7
[IFLYTEK] paramString:
timeout=20000,appid=8d48a2d7,msc.ver=1.0.1227.1180,openudid=1db54580aad8553760ffb8dceab96914d16136a9,work_dir=/var/mobile/Containers/Data/Application/214518F6-0EFF-436C-8619-9FBC90CD6130/Library/Caches,carrier=,os.system=iPadOS,os.release=16.6,os.version=16.6,os.model=iPad12.1,os.resolution=750*1334,os.manufact=apple,os.jailbreak=0,app.name=北麒AI店長,app.path=/private/var/containers/Bundle/Application/271C96B6-7913-4B8B-936F-22CF03A10652/Runner.app,app.pkg=Runner.app,app.bid=com.example.sdmm.flutter.store,net_type=wifi,appid=8d48a2d7
[IFLYTEK] login in
[connection] nw_socket_handle_socket_event [C4:2] Socket SO_ERROR [61: Connection refused]
Connection 4: received failure notification
Connection 4: failed to connect 1:61, reason -1
Connection 4: encountered error(1:61)
[connection] nw_connection_copy_connected_local_endpoint_block_invoke [C4] Client called nw_connection_copy_connected_local_endpoint on unconnected nw_connection
[connection] nw_connection_copy_connected_remote_endpoint_block_invoke [C4] Client called nw_connection_copy_connected_remote_endpoint on unconnected nw_connection
Task <CC0F6ABF-5D15-4182-BCD0-E41FCB6134A6>.<5> HTTP load failed, 0/0 bytes (error code: -1004 [1:61])
Task <CC0F6ABF-5D15-4182-BCD0-E41FCB6134A6>.<5> finished with error [-1004] Error Domain=NSURLErrorDomain Code=-1004 "無法連接服務器。" UserInfo={_kCFStreamErrorCodeKey=61, NSUnderlyingError=0x280139b30 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), viable, interface: lo0, _kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <CC0F6ABF-5D15-4182-BCD0-E41FCB6134A6>.<5>, _NSURLErrorRelatedURLSessionTaskErrorKey=("LocalDataTask <CC0F6ABF-5D15-4182-BCD0-E41FCB6134A6>.<5>"
), NSLocalizedDescription=無法連接服務器。, NSErrorFailingURLStringKey=http://127.0.0.1:8100/status, NSErrorFailingURLKey=http://127.0.0.1:8100/status, _kCFStreamErrorDomainKey=1}
error: Failed to halt process: Process is not running.
Debug service listening on ws://127.0.0.1:56485/0ZOw9sxGZCg=/ws
Syncing files to device 123456...