Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Script file does not exist, but the file exists. #749

Open
hosseinmd opened this issue Sep 16, 2024 · 3 comments · May be fixed by #756
Open

Error: Script file does not exist, but the file exists. #749

hosseinmd opened this issue Sep 16, 2024 · 3 comments · May be fixed by #756
Assignees
Labels
status:new New issue, not reviewed by the team yet. type:bug A bug report.

Comments

@hosseinmd
Copy link
Contributor

hosseinmd commented Sep 16, 2024

Describe the bug

I have a project with mode federation and remote bundles

I am getting this error after bundle downloaded successfully (I checked network)
Error: Script file does not exist: /data/user/0/com.a.dev/files/scripts/user.script.bundle
I check the file path and I realized it exists.

This error happening randomly. Some time all work, some time happenning for other containers.

System Info

Android 13
react-native 75
New Architecture

Re.Pack Version

4.3.3

Reproduction

n/a

Steps to reproduce

Create a react-native new architecture project with few containers. Make them remote federation.

@hosseinmd hosseinmd added status:new New issue, not reviewed by the team yet. type:bug A bug report. labels Sep 16, 2024
@artus9033
Copy link

Hi @hosseinmd, could you post your repack configuration or even better, provide an MRE to reproduce this problem? I checked locally with RN 0.75.3, newest Re.Pack and it works on my side.

@hosseinmd
Copy link
Contributor Author

hosseinmd commented Sep 21, 2024

Hi, it is hard to reproduce. But I will find a way.

I found the problem. It is because when a script is starting to load, another request was call but the config.fetch is set to false so second request want to read file from file system before than first request write code in that file.

It needs to wait until an ongoing process to loadScript finish, or prevent to load a script twice.

@hosseinmd hosseinmd linked a pull request Sep 21, 2024 that will close this issue
@hosseinmd
Copy link
Contributor Author

In this PR I fixed the issue.
#756

@thymikee thymikee linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:new New issue, not reviewed by the team yet. type:bug A bug report.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants