Code Monkey home page Code Monkey logo

Comments (7)

yancechen avatar yancechen commented on July 23, 2024

收到,我们排查一下~

from fair.

cuocuo avatar cuocuo commented on July 23, 2024

同样的问题,请问有解决吗? @yancechen

from fair.

yancechen avatar yancechen commented on July 23, 2024

还在排查中。

from fair.

xiangwc avatar xiangwc commented on July 23, 2024

问题

在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

能提供一下出错的代码吗?

from fair.

cuocuo avatar cuocuo commented on July 23, 2024

问题
在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

from fair.

cuocuo avatar cuocuo commented on July 23, 2024

这个可以先用其他类型替换BigInt吗,BigInt类型目前兼容性不好! @yancechen

from fair.

LynkKid avatar LynkKid commented on July 23, 2024

I am also facing the same error, please help me to solve it

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

from fair.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.