{"action":"created","issue":{"url":"https://api.github.com/repos/joltup/react-native-threads/issues/10","repository_url":"https://api.github.com/repos/joltup/react-native-threads","labels_url":"https://api.github.com/repos/joltup/react-native-threads/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/joltup/react-native-threads/issues/10/comments","events_url":"https://api.github.com/repos/joltup/react-native-threads/issues/10/events","html_url":"https://github.com/joltup/react-native-threads/issues/10","id":280624366,"node_id":"MDU6SXNzdWUyODA2MjQzNjY=","number":10,"title":"error in release build","user":{"login":"shubhanshusingh","id":8102163,"node_id":"MDQ6VXNlcjgxMDIxNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/8102163?v=4","gravatar_id":"","url":"https://api.github.com/users/shubhanshusingh","html_url":"https://github.com/shubhanshusingh","followers_url":"https://api.github.com/users/shubhanshusingh/followers","following_url":"https://api.github.com/users/shubhanshusingh/following{/other_user}","gists_url":"https://api.github.com/users/shubhanshusingh/gists{/gist_id}","starred_url":"https://api.github.com/users/shubhanshusingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubhanshusingh/subscriptions","organizations_url":"https://api.github.com/users/shubhanshusingh/orgs","repos_url":"https://api.github.com/users/shubhanshusingh/repos","events_url":"https://api.github.com/users/shubhanshusingh/events{/privacy}","received_events_url":"https://api.github.com/users/shubhanshusingh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-08T21:37:27Z","updated_at":"2018-08-23T16:01:03Z","closed_at":"2018-01-23T04:02:19Z","author_association":"NONE","body":"**_EXCEPTION Encountered after running in release mode!_**\r\n> 12-09 03:02:47.959 8890-9842/? E/UncaughtException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unable to load script from assets 'threads/._index.thread.bundle'. Make sure your bundle is packaged correctly or you're running a packager server.\r\n\r\n- my index.thread.js in the project root i.e same as index.android.js level.\r\n- I ran a command `node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./android/app/src/main/res/ --entry-file index.thread.js --platform android --bundle-output ./android/app/src/main/assets/threads/index.thread.bundle\r\n` \r\n- bundle got created under `/android/app/src/main/assets/threads`\r\n\r\nwhat could be the reason?? \r\nusing 0.49.5 - RN version\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/joltup/react-native-threads/issues/comments/415471266","html_url":"https://github.com/joltup/react-native-threads/issues/10#issuecomment-415471266","issue_url":"https://api.github.com/repos/joltup/react-native-threads/issues/10","id":415471266,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTQ3MTI2Ng==","user":{"login":"jorgempy","id":4259444,"node_id":"MDQ6VXNlcjQyNTk0NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4259444?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgempy","html_url":"https://github.com/jorgempy","followers_url":"https://api.github.com/users/jorgempy/followers","following_url":"https://api.github.com/users/jorgempy/following{/other_user}","gists_url":"https://api.github.com/users/jorgempy/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgempy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgempy/subscriptions","organizations_url":"https://api.github.com/users/jorgempy/orgs","repos_url":"https://api.github.com/users/jorgempy/repos","events_url":"https://api.github.com/users/jorgempy/events{/privacy}","received_events_url":"https://api.github.com/users/jorgempy/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T16:01:03Z","updated_at":"2018-08-23T16:01:03Z","author_association":"NONE","body":"I was able to solve it. the problem is that i dont know why, but the file it was trying to load was ` Starting web thread - ../../index.thread` so in  [line 62 of com/reactlibrary/RNThreadModule.java](https://github.com/joltup/react-native-threads/blob/540f20e68ca3a32ae12cc64896e53001fc391b89/android/src/main/java/com/reactlibrary/RNThreadModule.java#L63) it was replacing for the wrong path.\r\n\r\nFixed by changing\r\n\r\n`\r\n    String jsFileSlug = jsFileName.contains(\"./\")\r\n            ? jsFileName.replace(\"./\", \"\")\r\n            : jsFileName;\r\n`\r\n\r\nto\r\n\r\n`\r\n    String jsFileSlug = jsFileName.contains(\"../\")\r\n            ? jsFileName.replace(\"../\", \"\")\r\n            : jsFileName;\r\n    jsFileSlug = jsFileSlug.contains(\"./\")\r\n            ? jsFileSlug.replace(\"./\", \"\")\r\n            : jsFileSlug;\r\n`\r\n\r\nmaybe that code should be fixed in the repo?\r\n\r\nRegards."}}
{"actor":{"display_login":"jorgempy"}}