react native run-ios fails - react-native

This was working just Friday. No change in code. (Other than doing a time machine backup in Mac).
But since today react-native run-ios just does not seem to be working. The simulator comes up, but then the usual loading http://localhost:8081 does not show up any more. No errors or any indication on why this is failing. The simulator shows my App in home screen. Double clicking it just brings up and the app seems to crash immediately.
But react-native run-android works fine.
Am not sure where to even begin debugging this. (Am new to whole app development).
A few observations,
when I run npm start and then run react-native run-ios, it
usually "detects" that packager is running and skips launchPackager command, but today its not the case, the launchPackager opens regardless of whether a package is already running (Happens both with run-android and run-ios
There is usually below lines once the app begins loading. But today they only show up when I run react-native run-android
8:43:46 PM] find dependencies
transformed 728/728 (100%)
[8:43:46 PM] find dependencies (553ms)
[8:43:46 PM] request:/index.android.bundle?platform=android&dev=true&hot=false&minify=false (661ms)
And when I run react-native logs-ios, I get the below errors
Sep 12 20:53:15 sseshac-in-la com.apple.CoreSimulator.SimDevice.ADE00521-C04E-4EC5-8BE2-FE729523A0B9.launchd_sim[3812] (UIKitApplication:org.reactjs.native.example.X[0x3f02][4589]) <Notice>: Service exited due to signal: Abort trap: 6
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Error>: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Sep 12 20:53:15 sseshac-in-la Unknown[3832] <Error>:
Sep 12 20:53:15 sseshac-in-la SpringBoard[3828] <Warning>: Application 'UIKitApplication:org.reactjs.native.example.X[0x3f02]' crashed.
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Error>: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Sep 12 20:53:15 sseshac-in-la Unknown[3832] <Error>:
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Warning>: notify_suspend_pid() failed with error 7
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Error>: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Sep 12 20:53:15 sseshac-in-la Unknown[3832] <Error>:
Sep 12 20:53:15 sseshac-in-la SpringBoard[3828] <Warning>: Reply Error: Connection interrupted
Sep 12 20:58:36 sseshac-in-la routined[3817] <Error>: CoreLocation: Error occurred while trying to retrieve motion state update: CMErrorDomain Code:104
UPDATE:
I think the root cause seems to below error
<Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bundleURL must be non-nil when not implementing loadSourceForBridge'
Note that I am using React native 0.32. I understood that now it "detects" rather than hardcoding the bundleUrl. If someone can throw light on where this "detection" is, will be helpful

Problem turned out to be I was missing an entry in /etc/hosts
127.0.0.1 localhost
I still don't have any clue why it would work before. But that solved it

Probably you have problem with the packager make sure your modules all built you can check by opening
http://localhost:8081/index.ios.bundle?platform=ios&dev=true
in the browser after the build you will get the error

Related

React Native Expo Error. What should I do?

This is the Error :--
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #7: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #6: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #5: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #4: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:52 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #1: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:52 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #2: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #3: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #0: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
Error: ./gradlew exited with signal: SIGKILL
at ChildProcess.completionListener (/app/turtle/node_modules/#expo/xdl/node_modules/#expo/spawn-async/build/spawnAsync.js:51:23)
at Object.onceWrapper (events.js:418:26)
at ChildProcess.emit (events.js:311:20)
at ChildProcess.EventEmitter.emit (domain.js:482:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
...
at spawnAsync (/app/turtle/node_modules/#expo/xdl/node_modules/#expo/spawn-async/build/spawnAsync.js:17:21)
at spawnAsyncThrowError (/app/turtle/node_modules/#expo/xdl/build/detach/ExponentTools.js:201:45)
at buildShellAppAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:976:11)
at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:396:5)
at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)
at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)
at async build (/app/turtle/build/jobManager.js:181:33)
at async processJob (/app/turtle/build/jobManager.js:118:32)
at async Object.doJob (/app/turtle/build/jobManager.js:49:5)
at async main (/app/turtle/build/server.js:66:13)
This error is with Expo React Native.
Everything was working fine until I ran the command expo build:android
Here is the URL to all of the Logs
Abhyuday Tripathi
In my case I just closed and re-open the terminal and ran below command:
expo build:android -t apk
Do nothing, just try again. It is not your problem.
I ran into a very similar error after updating my global Expo npm package.
For some reason, an app that would always build crashed during building with that error.
As I hadn't done any changes to the actual app, I deleted the app/project from
expo.io, and rebuilt it with the expo build command. This made the build succeed.
I'm just leaving this here as an answer, in case someone runs into the same error after updating Expo.
First time I had this problem, reason was I've used an invalid slug name in app.json, there must be a dash between the words as below :
"expo": {
"slug": "My-App",
After a while I had the same problem,
I've realized that my expo-cli version wasn't latest one, I've
updated it
Just closed and re-opened the VS Code and terminal as
Zain said above in this page

rabbitmq-server-3.8.9 unable to start server

I am running rabbitmq-server-3.8.9 on fedora 29 machine with erlang 24. I am getting the following error.
sudo ./rabbitmq-server start
init terminating in do_boot ({undef,[{rabbit_misc,report_default_thread_pool_size,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
Crash dump is being written to: erl_crash.dump...done

Delaying module start till edgeHub fully initiates

I am trying to implement a python module (say, my-module) on arm32v7 Raspberry Pi-3 model. The module is based on resin/rpi-raspbian:stretch (azure-iothub-device-client==1.4.0b0). I have the iothub_client python library then working fine inside the module.
However when I am trying to deploy and do the iotedgectl start in the Pi, I get the following error in docker logs -f <my-module> :
Python 2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516]
IoT Hub Client for Python
Adding TrustedCerts from: /mnt/edgemodule/edge-device-ca.cert.pem
set_option TrustedCerts successful
Converted audio file 2643035.wav in 5.67014288902 seconds
Payload: {"translatedutctime": "2018-06-23T14:56:59.972036", "filename": "2643035.wav"}
Sending Payload for 2643035.wav ...
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Converted audio file 4417734.wav in 4.16613197327 seconds
Payload: {"translatedutctime": "2018-06-23T14:57:04.059473", "filename": "4417734.wav"}
Sending Payload for 4417734.wav ...
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Converted audio file 4486452.wav in 4.94396114349 seconds
Payload: {"translatedutctime": "2018-06-23T15:32:28.491401", "filename": "4486452.wav"}
Sending Payload for 4486452.wav ...
Confirmation[0] received for message with result = MESSAGE_TIMEOUT
Properties: {}
Total calls confirmed: 1
Now this goes on for several messages, and only after the start (never in between, once it stabilizes). After several such message timeouts and errors, the scenario returns back to normal, with callback confirmation, and I am also, able to receive the messages in IoTHub. As a result I always miss the first 5-10 messages and am unable to see those messages in IotHub.
After much trouble shooting, I figured there is a consistent problem. The edgeHub module always seems to fully initialize several seconds after my-module already start sending messages. Since edgeHub is not fully initialized and TLS authentication and MQTT paths are not set, the first few messages of my-module are lost. Maybe this is because the raspberry pi is a slow device?
I have tried starting my-module manually, after the edgeHub is fully initialized, all messages are delivered without any issues in that case.
Question: Is there a way to wait for the edgeHub to fully initialize and then start sending messages? More importantly, is this the actual problem or something else altogether is the cause of the issue?
Please let me know if more information is needed to get the problem context. I have tried to keep my query concise :)
What you pointed out is an accurate description of current behavior! As of current implementation, all modules are started at the same time. Some of them are initialized faster than edgeHub, which caused the behavior you'd seen. This is a known problem and we are implementing a fix!

iOS Simulator failed to install the application in Titanium

I have created a Titanium ios 3.1.0 app, But now when I am trying to run it is giving me the following error.
[ERROR] : An error occurred running the iOS Simulator
[ERROR] : [DEBUG] Session could not be started:
Error Domain=DTiPhoneSimulatorErrorDomain Code=1
"SpringBoard failed to launch application with error: -3"
UserInfo=0x7fe2b84837c0 {NSLocalizedDescription=SpringBoard failed to
launch application with error: -3, DTiPhoneSimulatorUnderlyingErrorCodeKey=-3}
[ERROR] :
[ERROR] : Project failed to build after 1m 8s 528ms
Currently it shows only black screen
I have no idea what to do next, any help would be appreciated.
Do following and you would be good to go
1)Clean the project
2)Delete the build
3)And final and most important reset the simulator
Thanks

XCode 4 Crash but not sure why?

XCode4 just crash on me when I was testing my app without saying why. I put the crash log I found on the device below. The app runs fine in the simulation so I am thinking it's the memory problem? I check for leaks but there is nothing serious to it, also there is not memory warning call.
The log said "Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-06-01-154632.plist" but I can't find it anywhere on my mac.
Please help,
Pondd
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:3795 (24506):0
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:920 (24506):3
Jun 1 15:46:31 unknown com.apple.debugserver-50[412] <Warning>: 1 [019c/1503]: error: ::read ( 4, 0x2ff8a9f0, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:3794 (24506):3
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:3202 (24506):10
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Working around 5020256. Assuming the job crashed.
Jun 1 15:46:31 unknown SpringBoard[28] <Warning>: Unable to delete job with label UIKitApplication:com.mondial.dva[0xd591]. Error: No such process
Jun 1 15:46:32 unknown ReportCrash[418] <Error>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-06-01-154632.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Jun 1 15:46:32 unknown configd[25] <Notice>: jetsam: kernel termination snapshot being created
Jun 1 15:46:32 unknown SCHelper[148] <Notice>: active (but IDLE) sessions
Jun 1 15:46:37 unknown SpringBoard[28] <Notice>: MultitouchHID(1cd11840) uilock state: 0 -> 1
Jun 1 15:46:41 unknown ReportCrash[420] <Notice>: Not saving Jetsam log because no data from the kernel.
Jun 1 15:46:41 unknown configd[25] <Notice>: jetsam: kernel termination snapshot being created
Jun 1 15:46:51 unknown ReportCrash[421] <Notice>: Not saving Jetsam log because no data from the kernel.
I found my LowMemory generated files through the organizer -> devices -> the device you are running on -> console -> right click on any of the logs on the left and select "Reveal in Finder"