catalinmiron / catalinmiron/react-native-weather-app

RCTWebSocketModule.connect - undefined is not an object

Open
#1 4 comments 8 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
54
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I'm using XCode 7.2 on a Mac OS with El Capitan

Followed the run instructions on the README. Simulator set to `iPhone 6s Plus`

ran `npm install`, `node_modules` folder has all required modules from `package.json`

```
2016-02-02 11:42:13.428 [warn][tid:com.facebook.React.JavaScript] undefined is not an object (evaluating 'RCTWebSocketModule.connect')
2016-02-02 11:42:13.432 [warn][tid:com.facebook.React.JavaScript] Requiring module "InitializeJavaScriptAppEngine" which threw an exception
(lldb)
```

Could it be related to this issue?
https://github.com/facebook/react-native/issues/3378

"I've had success by adding pod `'React/RCTWebSocket'` to the `Podfile` as well and running `pod install` again." hmmm ?? What is a podfile?

This issue is caused because RCTWebSocketManager is not defined in your bundled app. The connect method of an object cannot be called on an undefined or null object.

"To resolve this problem in iOS open Build Phases for your app target and ensure `libRCTWebSocket.a` exists in the Link Binary with Libraries section. If the item is not listed and not available for addition then add `RCTWebSocket.xcodeproj` to your app's Libraries folder in Xcode and try linking again."

Interesting... However, I can see `RCTWebSocket.xcodeproj` in my `Libraries`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the simulator failure from the README instructions, then inspect the Podfile, the app target's Build Phases, and Libraries/RCTWebSocket.xcodeproj mentioned in the report. Check whether libRCTWebSocket.a is linked and whether RCTWebSocketModule.connect is available; the issue is done when the bundled app starts without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, macos, react-native
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.