Closed yexianli closed 3 years ago
my react-native version "react-native": "0.59.10", my code ` import RNCalendarEvents from 'react-native-calendar-events'; inquireCalendarAuth = () => { RNCalendarEvents.requestPermissions() .then(status => { debugger; }) .catch(err => { debugger; });
<button onClick={this. inquireCalendarAuth}>test `
err = TypeError: Cannot read properties of undefined (reading 'requestPermissions') at requestPermissions$ (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:194043:66) at tryCatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41856:19) at Generator.invoke [as _invoke] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:42031:24) at Generator.prototype. [as next] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41899:23) at tryCatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41856:19) at invoke (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41932:22) at blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41962:13 at tryCallTwo (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:45581:7) at doResolve (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:45745:15) at new Promise (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:45604:5) at callInvokeWithMethodAndArg (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41961:18) at AsyncIterator.enqueue [as _invoke] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41966:131) at AsyncIterator.prototype. [as next] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41899:23) at Object.exports.async (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41982:65) at Object.requestPermissions (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:194038:35) at SubscribeButton.inquireCalendarAuth (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:193789:44) at SubscribeButton.proxiedMethod (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:58156:32) at SubscribeButton.subscribe (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:193817:14) at SubscribeButton.proxiedMethod (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:58156:32) at Object.onPress (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:193960:27) at Object.touchableHandlePress (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:10039:40) at Object._performSideEffectsForTransition (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:9308:16) at Object._receiveSignal (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:9234:14) at Object.touchableHandleResponderRelease (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:9113:12) at onResponderRelease (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:8038:47) at Object.invokeGuardedCallbackImpl (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:21882:16) at invokeGuardedCallback (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:21973:37) at invokeGuardedCallbackAndCatchFirstError (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:21977:31) at executeDispatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22171:9) at executeDispatchesInOrder (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22191:11) at executeDispatchesAndRelease (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22286:11) at executeDispatchesAndReleaseTopLevel (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22295:16) at Array.forEach () at forEachAccumulated (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22276:15) at runEventsInBatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22380:9) at runExtractedEventsInBatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22387:9) at blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23354:11 at batchedUpdates$1 (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:34560:18) at batchedUpdates (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23296:18) at _receiveRootNodeIDEvent (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23353:9) at Object.receiveTouches (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23383:11) at MessageQueue.callFunction (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16735:44) at blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16492:17 at MessageQueue.guard (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16689:13) at MessageQueue.callFunctionReturnFlushedQueue (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16491:14) at http://localhost:8081/debugger-ui/debuggerWorker.js:80:58
my react-native version "react-native": "0.59.10", my code ` import RNCalendarEvents from 'react-native-calendar-events'; inquireCalendarAuth = () => { RNCalendarEvents.requestPermissions() .then(status => { debugger; }) .catch(err => { debugger; });
<button onClick={this. inquireCalendarAuth}>test
err = TypeError: Cannot read properties of undefined (reading 'requestPermissions') at requestPermissions$ (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:194043:66) at tryCatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41856:19) at Generator.invoke [as _invoke] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:42031:24) at Generator.prototype. [as next] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41899:23) at tryCatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41856:19) at invoke (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41932:22) at blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41962:13 at tryCallTwo (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:45581:7) at doResolve (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:45745:15) at new Promise (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:45604:5) at callInvokeWithMethodAndArg (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41961:18) at AsyncIterator.enqueue [as _invoke] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41966:131) at AsyncIterator.prototype. [as next] (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41899:23) at Object.exports.async (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:41982:65) at Object.requestPermissions (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:194038:35) at SubscribeButton.inquireCalendarAuth (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:193789:44) at SubscribeButton.proxiedMethod (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:58156:32) at SubscribeButton.subscribe (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:193817:14) at SubscribeButton.proxiedMethod (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:58156:32) at Object.onPress (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:193960:27) at Object.touchableHandlePress (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:10039:40) at Object._performSideEffectsForTransition (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:9308:16) at Object._receiveSignal (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:9234:14) at Object.touchableHandleResponderRelease (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:9113:12) at onResponderRelease (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:8038:47) at Object.invokeGuardedCallbackImpl (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:21882:16) at invokeGuardedCallback (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:21973:37) at invokeGuardedCallbackAndCatchFirstError (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:21977:31) at executeDispatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22171:9) at executeDispatchesInOrder (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22191:11) at executeDispatchesAndRelease (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22286:11) at executeDispatchesAndReleaseTopLevel (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22295:16) at Array.forEach () at forEachAccumulated (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22276:15) at runEventsInBatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22380:9) at runExtractedEventsInBatch (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:22387:9) at blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23354:11 at batchedUpdates$1 (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:34560:18) at batchedUpdates (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23296:18) at _receiveRootNodeIDEvent (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23353:9) at Object.receiveTouches (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:23383:11) at MessageQueue.callFunction (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16735:44) at blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16492:17 at MessageQueue.guard (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16689:13) at MessageQueue.callFunctionReturnFlushedQueue (blob:http://localhost:8081/84e09145-32ce-4c10-ab46-26e708f7ddae:16491:14) at http://localhost:8081/debugger-ui/debuggerWorker.js:80:58