callstack / callstack/react-native-fbads
Getting this warning with an Error "Require cycle: node_modules\react-native-fbads\dist\lib\index.js -> node_modules\react-native-fbads\dist\lib\native-ads\withNativeAd.js -> node_modules\react-native-fbads\dist\lib\index.js Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle."
- 主要语言
- Java
- 星标
- 451
- 派生
- 147
- PR 合并指标
- 30 天内没有已合并 PR
描述
WARN : Require cycle: node_modules\react-native-fbads\dist\lib\index.js -> node_modules\react-native-fbads\dist\lib\native-ads\withNativeAd.js -> node_modules\react-native-fbads\dist\lib\index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
and
ERROR : error {"_dispatchInstances": {"_debugHookTypes": null, "_debugID": 2439, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugID": 2437, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": [Circular], "childExpirationTime": 0, "dependencies": null, "effectTag": 1, "elementType": [Function BannerView], "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0, "sibling": null, "stateNode": null, "tag": 0, "treeBaseDuration": 1, "type": [Function BannerView], "updateQueue": null}, "_debugSource": {"columnNumber": 13, "fileName": "D:\\BlackWallpaperCVS\\node_modules\\react-native-fbads\\dist\\lib\\BannerViewManager.js", "lineNumber": 24}, "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": null, "childExpirationTime": 0, "dependencies": null, "effectTag": 0, "elementType": "CTKBannerView", "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": {"onAdError": [Function onError], "onAdLoad": [Function onLoad], "onAdPress": [Function onPress], "placementId": "148526777042150_14910*******07", "size": 50, "style": [Array]}, "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": {"onAdError": [Function onError], "onAdLoad": [Function onLoad], "onAdPress": [Function onPress], "placementId": "148526777042150_1********7407", "size": 50, "style": [Array]}, "ref": null, "return": {"_debugHookTypes": null, "_debugID": 2437, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": [Circular], "childExpirationTime": 0, "dependencies": null, "effectTag": 1, "elementType": [Function BannerView], "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0, "sibling": null, "stateNode": null, "tag": 0, "treeBaseDuration": 1, "type": [Function BannerView], "updateQueue": null}, "selfBaseDuration": 1, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 385, "viewConfig": [Object]}, "tag": 5, "treeBaseDuration": 1, "type": "CTKBannerView", "updateQueue": null}, "_dispatchListeners": [Function onError], "_targetInst": {"_debugHookTypes": null, "_debugID": 2439, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugID": 2437, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": [Circular], "childExpirationTime": 0, "dependencies": null, "effectTag": 1, "elementType": [Function BannerView], "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0, "sibling": null, "stateNode": null, "tag": 0, "treeBaseDuration": 1, "type": [Function BannerView], "updateQueue": null}, "_debugSource": {"columnNumber": 13, "fileName": "D:\\BlackWallpaperCVS\\node_modules\\react-native-fbads\\dist\\lib\\BannerViewManager.js", "lineNumber": 24}, "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": null, "childExpirationTime": 0, "dependencies": null, "effectTag": 0, "elementType": "CTKBannerView", "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": {"onAdError": [Function onError], "onAdLoad": [Function onLoad], "onAdPress": [Function onPress], "placementId": "148526777********17407", "size": 50, "style": [Array]}, "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": {"onAdError": [Function onError], "onAdLoad": [Function onLoad], "onAdPress": [Function onPress], "placementId": "14852677704********107540317407", "size": 50, "style": [Array]}, "ref": null, "return": {"_debugHookTypes": null, "_debugID": 2437, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": [Circular], "childExpirationTime": 0, "dependencies": null, "effectTag": 1, "elementType": [Function BannerView], "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0, "sibling": null, "stateNode": null, "tag": 0, "treeBaseDuration": 1, "type": [Function BannerView], "updateQueue": null}, "selfBaseDuration": 1, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 385, "viewConfig": [Object]}, "tag": 5, "treeBaseDuration": 1, "type": "CTKBannerView", "updateQueue": null}, "bubbles": undefined, "cancelable": undefined, "currentTarget": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugID": 2439, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": null, "childExpirationTime": 0, "dependencies": null, "effectTag": 0, "elementType": "CTKBannerView", "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 1, "sibling": null, "stateNode": [Circular], "tag": 5, "treeBaseDuration": 1, "type": "CTKBannerView", "updateQueue": null}, "_nativeTag": 385, "viewConfig": {"NativeProps": [Object], "bubblingEventTypes": undefined, "directEventTypes": [Object], "uiViewClassName": "CTKBannerView", "validAttributes": [Object]}}, "defaultPrevented": undefined, "dispatchConfig": {"registrationName": "onAdError"}, "eventPhase": undefined, "isDefaultPrevented": [Function functionThatReturnsFalse], "isPropagationStopped": [Function functionThatReturnsFalse], "isTrusted": undefined, "nativeEvent": {"errorCode": 1001, "errorMessage": "No fill"}, "target": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugID": 2439, "_debugIsCurrentlyTiming": false, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 3, "actualStartTime": 2839, "alternate": null, "child": null, "childExpirationTime": 0, "dependencies": null, "effectTag": 0, "elementType": "CTKBannerView", "expirationTime": 0, "firstEffect": null, "index": 0, "key": null, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 1, "sibling": null, "stateNode": [Circular], "tag": 5, "treeBaseDuration": 1, "type": "CTKBannerView", "updateQueue": null}, "_nativeTag": 385, "viewConfig": {"NativeProps": [Object], "bubblingEventTypes": undefined, "directEventTypes": [Object], "uiViewClassName": "CTKBannerView", "validAttributes": [Object]}}, "timeStamp": 1609920645720, "type": undefined}
贡献指南
调研方向
首先追踪经过 node_modules/react-native-fbads/dist/lib/index.js 和 dist/lib/native-ads/withNativeAd.js 的 require 循环。然后检查第 24 行的 dist/lib/BannerViewManager.js,并复现带有 errorCode 1001 的 BannerView onAdError 事件;当理解了不同的警告和错误行为,并获得经过验证的解决方案时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react-native
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100