Skip to content

Reload app on android device issue on windows (ERROR EBUSY: resource busy or locked) #13022

@farhan687

Description

@farhan687

Description

I have connected android device and then I ran following commands on different terminal tabs:
react-native start
react-native run-android

App is working fine for the first time.
After changing the content in index.android.js file, I tap Reload option from dev menu of the device, and then it shows analyzing and start transforming modules for couple of seconds and suddenly it stops with the following error.

native-error

`
ERROR EBUSY: resource busy or locked,
rename 'C:\Users\Farhan\AppData\Local\Temp\react-native-packager-cache-bc7c6964\1f\ad664aAppRegistry.js.meta.4164767065' -> 'C:\Users\Farhan\AppData\Local\Temp\react-native-packager-cache-bc7c6964\1f\ad664aAppRegistry.js.meta'
{"errno":-4082,"code":"EBUSY","syscall":"rename","path":"C:\Users\Farhan\AppData\Local\Temp\react-native-packager-cache-bc7c6964\1f\ad664aAppRegistry.js.meta.4164767065","dest":"C:\Users\Farhan\AppData\Local\Temp\react-native-packager-cache-bc7c6964\1f\ad664aAppRegistry.js.meta"}
Error: EBUSY: resource busy or locked, rename 'C:\Users\Farhan\AppData\Local\Temp\react-native-packager-cache-bc7c6964\1f\ad664aAppRegistry.js.meta.4164767065' -> 'C:\Users\Farhan\AppData\Local\Temp\react-native-packager-cache-bc7c6964\1f\ad664aAppRegistry.js.meta'
at Error (native)
at Object.fs.renameSync (fs.js:809:18)
at writeFileSync (E:\Work\appbaseWork\native\HelloWorld\node_modules\write-file-atomic\index.js:95:8)
at Object.writeSync (E:/Work/appbaseWork/native/HelloWorld/node_modules/react-native/packager/src/lib/TransformCache.js:138:3)
at _getTransformedCode (E:/Work/appbaseWork/native/HelloWorld/node_modules/react-native/packager/src/node-haste/Module.js:296:22)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
`

It looks like npm issue with windows. It would be very helpful if anybody can provide me solution or any helpful link to get rid off this issue.

Reproduction

Steps:
On windows 10

  • react-native start
  • react-native run-android
  • change contend and tap reload option on device

Additional Information

  • React Native version: 0.42.2
  • Platform: Android
  • Operating System: Windows 10
  • Dev tools: Android device - android version 5.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions