Open eatoncw opened 5 years ago
I'm getting an error when I try to make a Graph request. I'm just following the example listed in the readme.
The Error I'm getting is: [["<<Function >>"],0,567] is not usable as a native method argument
[["<<Function >>"],0,567] is not usable as a native method argument
and then `Malformed calls from JS: field sizes are different.
[[2,26,19,69,69,69,69,69,69,69],[0,0,4,3,3,3,3,3,3,0],[["[[\"<>\"],0,567] is not usable as a native method argument",[{"lineNumber":2488,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"MessageQueue.enqueueNativeCall","column":11},{"lineNumber":2101,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"Object.fn [as start]","column":23},{"lineNumber":106195,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"FBGraphRequestManager.start","column":35},{"lineNumber":145805,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"","column":93},{"lineNumber":27781,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"","column":21},{"lineNumber":27698,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"_callTimer","column":9},{"lineNumber":27905,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"Object.callTimers","column":9},{"lineNumber":2587,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"MessageQueue.__callFunction","column":44},{"lineNumber":2344,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"","column":17}],1],[[],"bb000d27-b280-4c79-b1db-5f0533250bef"],["didSendNetworkData"],["didReceiveNetworkResponse"],["didReceiveNetworkData"],["didReceiveNetworkIncrementalData"],["didReceiveNetworkDataProgress"],["didCompleteNetworkResponse"],[{"responseType":"blob","url":"http://localhost:8081/symbolicate","data":{"trackingName":"unknown","string":"{\"stack\":[{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"MessageQueue.enqueueNativeCall\",\"lineNumber\":2488,\"column\":11},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"Object.fn [as start]\",\"lineNumber\":2101,\"column\":23},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"FBGraphRequestManager.start\",\"lineNumber\":106195,\"column\":35},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"\",\"lineNumber\":145805,\"column\":93},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"\",\"lineNumber\":27781,\"column\":21},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"_callTimer\",\"lineNumber\":27698,\"column\":9},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"Object.callTimers\",\"lineNumber\":27905,\"column\":9},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"MessageQueue.__callFunction\",\"lineNumber\":2587,\"column\":44},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"\",\"lineNumber\":2344,\"column\":17}]}"},"timeout":0,"method":"POST","headers":{"content-type":"text/plain;charset=UTF-8"},"withCredentials":false,"incrementalUpdates":false},585]],283]`
`componentDidMount() { new GraphRequestManager().addRequest(this.infoRequest).start(); }
responseInfoCallback = (error, result) => { if (error) { console.log("Error fetching data: " + error.toString()); } else { console.log("Success fetching data: " + result.toString()); } };
// Create a graph request asking for user information with a callback to handle the response. infoRequest = () => new GraphRequest("/me?fields=id,name", null, this.responseInfoCallback); `
System: OS: macOS High Sierra 10.13.6 CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz Memory: 149.99 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node Yarn: 1.9.4 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 IDEs: Android Studio: 3.3 AI-182.5107.16.33.5314842 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.8.3 => 16.8.3 react-native: 0.59.3 => 0.59.3 npmGlobalPackages: react-native-cli: 2.0.1
"dependencies": { "moment": "^2.24.0", "react": "16.8.3", "react-native": "0.59.3", "react-native-config": "^0.11.7", "react-native-fbsdk": "^0.8.0", "react-native-datepicker": "^1.7.2", "react-native-firebase": "^5.2.3", "react-native-gesture-handler": "^1.1.0", "react-native-modal": "^9.0.0", "react-native-swipe-list-view": "^1.5.3", "react-native-vector-icons": "^6.4.2", "react-navigation": "^3.8.1", "react-redux": "^7.0.2", "redux": "^4.0.1", "redux-thunk": "^2.3.0" },
I have a same error with a normal axios request.
I'm getting an error when I try to make a Graph request. I'm just following the example listed in the readme.
🐛 Bug Report
The Error I'm getting is:
[["<<Function >>"],0,567] is not usable as a native method argument
and then `Malformed calls from JS: field sizes are different.
[[2,26,19,69,69,69,69,69,69,69],[0,0,4,3,3,3,3,3,3,0],[["[[\"<>\"],0,567] is not usable as a native method argument",[{"lineNumber":2488,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"MessageQueue.enqueueNativeCall","column":11},{"lineNumber":2101,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"Object.fn [as start]","column":23},{"lineNumber":106195,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"FBGraphRequestManager.start","column":35},{"lineNumber":145805,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"","column":93},{"lineNumber":27781,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"","column":21},{"lineNumber":27698,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"_callTimer","column":9},{"lineNumber":27905,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"Object.callTimers","column":9},{"lineNumber":2587,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"MessageQueue.__callFunction","column":44},{"lineNumber":2344,"file":"blob:file:///25ce3d70-2e23-4543-b4a3-579ff13bf6d7","methodName":"","column":17}],1],[[],"bb000d27-b280-4c79-b1db-5f0533250bef"],["didSendNetworkData"],["didReceiveNetworkResponse"],["didReceiveNetworkData"],["didReceiveNetworkIncrementalData"],["didReceiveNetworkDataProgress"],["didCompleteNetworkResponse"],[{"responseType":"blob","url":"http://localhost:8081/symbolicate","data":{"trackingName":"unknown","string":"{\"stack\":[{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"MessageQueue.enqueueNativeCall\",\"lineNumber\":2488,\"column\":11},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"Object.fn [as start]\",\"lineNumber\":2101,\"column\":23},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"FBGraphRequestManager.start\",\"lineNumber\":106195,\"column\":35},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"\",\"lineNumber\":145805,\"column\":93},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"\",\"lineNumber\":27781,\"column\":21},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"_callTimer\",\"lineNumber\":27698,\"column\":9},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"Object.callTimers\",\"lineNumber\":27905,\"column\":9},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"MessageQueue.__callFunction\",\"lineNumber\":2587,\"column\":44},{\"file\":\"http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false\",\"methodName\":\"\",\"lineNumber\":2344,\"column\":17}]}"},"timeout":0,"method":"POST","headers":{"content-type":"text/plain;charset=UTF-8"},"withCredentials":false,"incrementalUpdates":false},585]],283]`
Code Example
`componentDidMount() { new GraphRequestManager().addRequest(this.infoRequest).start(); }
responseInfoCallback = (error, result) => { if (error) { console.log("Error fetching data: " + error.toString()); } else { console.log("Success fetching data: " + result.toString()); } };
// Create a graph request asking for user information with a callback to handle the response. infoRequest = () => new GraphRequest("/me?fields=id,name", null, this.responseInfoCallback); `
Environment
System: OS: macOS High Sierra 10.13.6 CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz Memory: 149.99 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node Yarn: 1.9.4 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 IDEs: Android Studio: 3.3 AI-182.5107.16.33.5314842 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.8.3 => 16.8.3 react-native: 0.59.3 => 0.59.3 npmGlobalPackages: react-native-cli: 2.0.1
"dependencies": { "moment": "^2.24.0", "react": "16.8.3", "react-native": "0.59.3", "react-native-config": "^0.11.7", "react-native-fbsdk": "^0.8.0", "react-native-datepicker": "^1.7.2", "react-native-firebase": "^5.2.3", "react-native-gesture-handler": "^1.1.0", "react-native-modal": "^9.0.0", "react-native-swipe-list-view": "^1.5.3", "react-native-vector-icons": "^6.4.2", "react-navigation": "^3.8.1", "react-redux": "^7.0.2", "redux": "^4.0.1", "redux-thunk": "^2.3.0" },