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

v0.7.6 build fails: package android.support.annotation does not exist #1496

Closed
schildbach opened this issue Jun 15, 2023 · 11 comments
Closed
Labels
Bug Something isn't working

Comments

@schildbach
Copy link
Contributor

schildbach commented Jun 15, 2023

Describe the bug

Fatal, see log file below.

/olympus/zeus/node_modules/react-native-tcp/android/src/main/java/com/peel/react/TcpSocketManager.java:3: error: package android.support.annotation does not exist
/olympus/zeus/node_modules/react-native-tcp/android/src/main/java/com/peel/react/TcpSockets.java:8: error: package android.support.annotation does not exist

Further above there are more errors, probably unrelated:

Error: EACCES: permission denied, open 'node_modules/react-native-udp/android/src/main/java/com/tradle/react/UdpSocketClient.java'
    at Object.openSync (node:fs:590:3)
    at writeFileSync (node:fs:2202:35)
    at process.<anonymous> (/olympus/zeus/node_modules/jetifier/src/worker.js:13:9)
    at process.emit (node:events:513:28)
    at emit (node:internal/child_process:946:14)
    at processTicksAndRejections (node:internal/process/task_queues:84:21) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: 'node_modules/react-native-udp/android/src/main/java/com/tradle/react/UdpSocketClient.java'
}

Reproduce

From a clean workspace, run ./build.sh.

Zeus version

v0.7.6

Node interface

LND (REST)

Network

Tor

Device

Dell XPS

Device operating system

Ubuntu 22.04.2

Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.3

Log output

(will add as file attachment)
@schildbach schildbach added the Bug Something isn't working label Jun 15, 2023
@schildbach
Copy link
Contributor Author

build.log

@schildbach
Copy link
Contributor Author

Just checked, and the same issue was already present in v0.7.5, which is marked as the currently released version on GitHub.

@Giszmo
Copy link

Giszmo commented Jun 22, 2023

The EACCESS happens if you run the build twice I think. The docker container is acting as root and leaving the node_modules owned by root.

The build error ... can confirm.

@kaloudis
Copy link
Contributor

The EACCESS happens if you run the build twice I think. The docker container is acting as root and leaving the node_modules owned by root.

The build error ... can confirm.

We'll still address this issue, but try running as root; it should produce a deterministic build.

I hadn't caught this earlier because the react-native-community Docker image doesn't support Apple silicon which my machine uses. When I build I typically pull down a fresh box and just run everything as root.

@ktecho
Copy link
Contributor

ktecho commented Jun 24, 2023

I've updated the libraries that were giving problems. I've tested that the app compiles now, but as some libraries contain more than 3 years of changes, maybe we need to test the app before merging to master?

I'll do some app testing if somebody don't do it before, but I'm traveling during the weekend, so I don't have a lot of time to do it now :)

@ktecho
Copy link
Contributor

ktecho commented Jun 24, 2023

@kaloudis I also forgot to say that another fix would be upgrading the container to version 9.0 (reactnativecommunity/react-native-android:9.0). This also fixes the problem.

As a fix, it could be worse because I don't know how it fixes the problem, but the good part would be that we are not touching the code or the libraries, so we don't need to extra-test the app.

@Giszmo
Copy link

Giszmo commented Jun 24, 2023

For WalletScrutiny, running as root is not practical but I also don't know what is fair to expect and what not. The current reproducible build instructions require root and use a huge docker image of 3.5GB and of course the 1GB for the NDK. Emanuel showed for an older version how building can be done without requiring root and with a much slimmer (and more "standard") docker image here.

I might be able to test the current version using root at some point - renting a server would be my choice for ease of use but I'm also looking into headless qemu/virtualbox. It needs to be possible to automate the testing of new versions without running blindly whatever the build.sh turned into on my machine.

@ktecho
Copy link
Contributor

ktecho commented Jun 24, 2023

For WalletScrutiny, running as root is not practical but I also don't know what is fair to expect and what not. The current reproducible build instructions require root and use a huge docker image of 3.5GB and of course the 1GB for the NDK. Emanuel showed for an older version how building can be done without requiring root and with a much slimmer (and more "standard") docker image here.

I might be able to test the current version using root at some point - renting a server would be my choice for ease of use but I'm also looking into headless qemu/virtualbox. It needs to be possible to automate the testing of new versions without running blindly whatever the build.sh turned into on my machine.

Root is not needed if you use my PR, or use version 9.0 of the reactnativecommunity/react-native-android container.

@mohammadrafigh
Copy link

I can confirm that v0.7.7-beta1 is reproducible. We will mark Zeus as reproducible in WalletScrutiny soon.

@Giszmo
Copy link

Giszmo commented Jul 25, 2023

This was published two days ago.

@kaloudis
Copy link
Contributor

Fixed in v0.7.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants