-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Package does not work on Android. #19
Comments
Hey, I'm not on the wesh/berty team but I've been playing around with this too. I actually have it somewhat working to the point where compiled go code can be used in an expo app. I'll push my changes up to a fork so you can see what I did (I hit a lot of the same things you did). |
@danilobassi8, here you go: https://github.com/bluesliverx/weshnet-expo
I made these notes to myself as well in an app that is using it with this dependency in the
After making any changes to the code in weshnet-expo, run the following: # In this repo
npm install
cd ../weshnet-expo
make all After making changes to the native code in weshnet-expo, run the following: #TODO Ensure that this is correct, the prebuild may not be needed?
# In this repo
npm install
cd ../weshnet-expo
make all
cd -
npx expo prebuild --clean Finally, I should say after getting this working, I started playing around with the weshnet go code itself and found that the tutorial they provide does not work as is - the connect never happens. It must be something with my network setup or something, but I have yet to figure it out even when using go code directly. |
@bluesliverx thanks for your comments. I tried your fork and I got this error when running
If I checkout to your previous commit, I have the same error as the original repo. |
This is why I haven't pushed anything up 😅 Try removing those star imports for the types, it's likely not the right way to do it anyways |
I got stuck at the same point when trying to run it for Android. The execution deads in I'd like to add to this issue that when running
Note: the It seems that something is wrong in either |
@jefft0 to try to reproduce the error on an Ubuntu VM. |
Thank you for opening the issue 🙏 We confirm this is an important bug and we need to fix it. To put things in perspective, we are currently focused on fixing the RDV server issues (which requires updating a lot of components, a laborious task). So, we could approximate Sept 2024 when we will attack this Expo Module bug. We imagine it is frustrating to have so slow times of addressing important bugs, but we have limited resources and a few very important priorities in some tangent projects. However, we will improve Berty Messenger and more than that, have the Wesh Network protocol power more decentralized dApps. Stay tuned :) |
This is the same problem I'm hitting locally with pure go code I believe as well. Thanks everyone for looking into it |
Hello @danilobassi8 . I am trying to reproduce your bug. I think you got farther than I did in the build process. I'm getting an error from gradle. So, what is your version of the Android SDK? If you installed Android Studio, what is its version? Thanks. |
Hi @jefft0 , thanks for addressing this issue. I'm using it with default settings, but I also tried other JDKs to check if it works, but it didn't. |
Hello @danilobassi8 . I have reproduced your error |
ipfs/kubo#10492 fixes I've opened a PR (#20) to start fixing this issue, and waiting that kubo v0.31 will be released. |
@danilobassi8, with the latest fixes, I'm able to build on Ubuntu 22.04 and run the example on my Android phone. Do you want to try again? |
When I build, I use asdf as described in the original post. It uses the versions in this file.
|
@jefft0 that is a good call, I made sure to match those versions now with asdf. To be clear, I'm installing the weshnet-expo package into another project. I first tried it using the npm package published upstream, but that failed with the I am now getting an error that it cannot read the property On the other side, iOS is working great and I get a PeerID just fine, so it's just a problem with Android. |
Thanks for the feedback. We confirm this issue and we're looking into it. |
Thanks @jefft0. Here are some changes I made to get the dependent project further along (fixes the |
Hi @bluesliverx , #22 should fix your issue. |
No more comments from poster. Issue has been fixed in our tests. Closing as resolved. |
Hi guys, thanks for the efforts you put into making this expo module.
I've been trying to make a React app that uses the wesh protocol for the last weeks. I know nothing about golang, but I read on the discord channel that you've been working on this package to abstract the complexity of having to compile go code, and build our own native layer.
When I try to run the provided example app on the
/example
directory, I am having some errors. I'll put all the steps I made in order to make it "almost" work in my setup.Setup
OS: Ubuntu 22.04 LTS
Phone: Motorola g100 with Android 12.
Steps to reproduce the error:
1 - Clone the repo and install packages.
git clone git@github.com:berty/weshnet-expo.git cd weshnet-expo make asdf.install_plugins make asdf.install_tools
2 - Run the provided example
cd example make node_modules npm run android
After this step, I'm seeing this error:
After adding
buf 1.15.1
in the .tool-versions, and runningmake asdf.install_plugins
andmake asdf.install_tools
again, and re-runningnpm run android
now I see this issue:In my case, the solution to this error was creating a /tmp directory and adding this in line 103 on the Makefile at the root of the project.
with this little changes, now I'm able to build the code.
But as soon as I open the app on my phone, I see some errors, and the expo console says this:
Trying to debug what is going on, I replaced this line in
WeshnetExpoModule.kt
Now, in the console, I'm able to see this error:
I don't know how to fix that issue. And I don't know if this is something on your side or a third party library you use.
I remember reading on the discord channel that your priorities have changed since the weshnet-expo project was created, and the last commit was 10 month ago, but I'd be glad to help in this project because I truly believe that this is the best way to expose the wesh protocol for react devs.
Let me know if you need help on testing this issue.
Thanks in advance!
The text was updated successfully, but these errors were encountered: