question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Bundle Release

See original GitHub issue

I am experiencing an issue with threads in production/release.

2018-01-31 16:27:03.209993+0000 TestApp[72678:38924584] starting Thread (null)
2018-01-31 16:27:03.217 [fatal][tid:main] No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.

My Threads don’t live in the root of the project, they live in ./App/Workers/*.thread.js. I have also followed the documentation for building .jsbundle files and adding them to ./ios.

In development, everything works as expected:

2018-01-31 17:14:34.192937+0000 TestApp[75866:39010763] starting Thread http://localhost:8081/./App/Workers/Test.Generate.thread.bundle?platform=ios&dev=true&minify=false
2018-01-31 17:14:34.193 [info][tid:com.facebook.react.ThreadManagerQueue][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x6080001b42e0> (parent: <RCTBridge: 0x60c0002a57c0>, executor: (null))
2018-01-31 17:14:34.193265+0000 TestApp[75866:39010763] Initializing <RCTCxxBridge: 0x6080001b42e0> (parent: <RCTBridge: 0x60c0002a57c0>, executor: (null))

Am I experiencing this issue because my thread files don’t live in the root of the project?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Traviskncommented, Feb 4, 2018

Thanks, I’ve merged your update to the docs! Let me know if you run into any more issues

1reaction
Traviskncommented, Feb 1, 2018

Hi @craigcoles, sorry you ran into this issue!

My understanding is that if your thread.js file lives in a different folder like App/Workers/MyWorker.thread.js, then you will need to re-create that same file structure in the ios folder. The path that you pass to the new Thread('some/path') is actually the native code filepath, relative to the ios folder in the root of your project. So in this case I believe you would need to open your project in xcode, right click on your root folder and select the “New Group” option to add an “App” folder, then select the “App” folder, right click, select the “New Group” option and create a “Workers” folder, then finally right click on the “Workers” folder and select the “add files to <your project>” option to add your worker js file to the native project.

For android you would create the matching folder structure in the android/app/src/main/assets/threads folder of your project.

Let me know if that makes sense or if it still doesn’t work for you. Keeping thread files at the root level definitely keeps things simpler so that you don’t need to add too many extra folders in your native ios and android directories. I’ll make some time to add a bit more explanation of this to the README as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get offline bundling of iOS in React Native?
Then open up the project inside ios/ in Xcode and Select the target -> General Tab Under signing choose the signing team and...
Read more >
iOS main.jsbundle will not create automatically or update ...
React native is not creating a main.jsbundle for ios automatically. One must manually be created, even though the scheme set as release.
Read more >
CFBundleVersion | Apple Developer Documentation
CFBundleVersion. The version of the build that identifies an iteration of the bundle. iOS 2.0+ iPadOS 2.0+ macOS 10.0+ tvOS 9.0+ watchOS 2.0+ ......
Read more >
Generating the static bundle in iOS - Packt Subscription
Before we create releases for iOS and Android, we need to generate the static JS bundle that our application will load. We will...
Read more >
Publishing to Apple App Store - React Native
To configure your app to be built using the Release scheme, go to Product → Scheme → Edit Scheme. Select the Run tab...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found