Open guyuuan opened 2 years ago
收到,我们排查一下~
同样的问题,请问有解决吗? @yancechen
还在排查中。
问题
在ios使用plugin调用dart侧方法报错,在Android可以正常调用
环境信息
提供Fair版本号
dependencies: fair: 2.7.0
相关截图【可选】
[Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke, Line:87 >> {"pageName":"plugin_test#0","type":"method","args":{"funcName":"_onPressed","args":null}} [Fair]: File:FairJSBridge.m, Function:-[FairJSBridge context]_block_invoke, Line:220 >> exceptionValue:ReferenceError: Cannot access uninitialized variable. [Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke_2, Line:92 >> undefined [Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke_2, Line:96 >> undefined
能提供一下出错的代码吗?
问题 在ios使用plugin调用dart侧方法报错,在Android可以正常调用 环境信息 提供Fair版本号
dependencies: fair: 2.7.0
相关截图【可选】
[Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke, Line:87 >> {"pageName":"plugin_test#0","type":"method","args":{"funcName":"_onPressed","args":null}} [Fair]: File:FairJSBridge.m, Function:-[FairJSBridge context]_block_invoke, Line:220 >> exceptionValue:ReferenceError: Cannot access uninitialized variable. [Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke_2, Line:92 >> undefined [Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke_2, Line:96 >> undefined
能提供一下出错的代码吗?
大概定位到问题了。fair_jsbase.js文件中有bigint类型在iOS14一下的系统上是不支持的,导致了加载js文件失败。我在iOS15系统上就可以跑通,iOS12的系统就会报错。 https://webkit.org/blog/11340/new-webkit-features-in-safari-14/ https://caniuse.com/bigint 这两个文章都有对bigint的支持有说明! @zhiqingchen
这个可以先用其他类型替换BigInt吗,BigInt类型目前兼容性不好! @yancechen
I am also facing the same error, please help me to solve it
[Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke, Line:87 >> {"pageName":"null#2","type":"method","args":{"funcName":"onBack","args":null}} [Fair]: File:FairJSBridge.m, Function:-[FairJSBridge context]_block_invoke, Line:220 >> exceptionValue:TypeError: undefined is not an object (evaluating 'mClass[funcName]') [Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke_2, Line:92 >> undefined [Fair]: File:FairDartBridge.m, Function:-[FairDartBridge setDartListener]_block_invoke_2, Line:96 >> undefined
问题
在ios使用plugin调用dart侧方法报错,在Android可以正常调用
环境信息
提供Fair版本号
相关截图【可选】