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

Dependency error during mobile local development #2113

Open
rajdip-b opened this issue Nov 24, 2023 · 15 comments
Open

Dependency error during mobile local development #2113

rajdip-b opened this issue Nov 24, 2023 · 15 comments

Comments

@rajdip-b
Copy link
Collaborator

The REAMME.md in packages/mobile/ specifies a set of commands to run in order to be able to run the mobile app locally for development However, the process fails due to some dependency issue:
image

Steps to reproduce:

  • Try running the mobile application as mentioned in the README.md
@rajdip-b rajdip-b added bug Something isn't working react-native labels Nov 24, 2023
@holmesworcester
Copy link
Contributor

@siepra any ideas?

@holmesworcester holmesworcester moved this to Backlog - Mobile in Quiet Nov 24, 2023
@siepra siepra added android and removed bug Something isn't working react-native labels Nov 24, 2023
@siepra
Copy link
Contributor

siepra commented Nov 24, 2023

As the logs states: maven throws HTTP 403 when trying to download the dependency from tor-android-binary.
Merge this branch into yours and it should work #2024
I think we'll merge in into develop shortly

@rajdip-b
Copy link
Collaborator Author

@siepra Sure.

@holmesworcester holmesworcester added the bug Something isn't working label Nov 24, 2023
@holmesworcester holmesworcester moved this from Backlog - Mobile to Next Sprint in Quiet Nov 24, 2023
@rajdip-b
Copy link
Collaborator Author

Hey @siepra, I tried merging the latest develop branch and I got yet another error:
image

Any ideas?

@holmesworcester
Copy link
Contributor

@rajdip-b siepra will be back online on Monday CEST. Thanks for pushing on this!

@siepra siepra added support and removed bug Something isn't working labels Nov 27, 2023
@siepra
Copy link
Contributor

siepra commented Nov 27, 2023

@rajdip-b You got "failed: connect timed out" when trying to fetch the dependency from Maven repo. Make sure your internet connection is solid and the Maven repo is not down. Maybe wait a while and then try again.
https://mvnrepository.com/artifact/info.guardianproject/tor-android

When it comes to the android-specific log output, the very error message appears somewhere around the middle of the console window, just above the:

> Try:
> Run with --stacktrace option to get the stack trace.

@holmesworcester I replaced the "bug" label with "support". I don't think there's a bug anywhere in our codebase nor README and it's rather a matter of providing help with setting up.

@rajdip-b
Copy link
Collaborator Author

@rajdip-b You got "failed: connect timed out" when trying to fetch the dependency from Maven repo. Make sure your internet connection is solid and the Maven repo is not down. Maybe wait a while and then try again.

When it comes to the android-specific log output, the very error message appears somewhere around the middle of the console window, just above the:

> Try:
> Run with --stacktrace option to get the stack trace.

@holmesworcester I replaced the "bug" label with "support". It seems way more accurate.

Hmm.. Don't think that my internet caused an issue. Anyways I'll double check and also run with the stacktrace flag set.

@siepra
Copy link
Contributor

siepra commented Nov 27, 2023

@rajdip-b I've just checked by cleaning my gradle cache and building the project and it worked fine with the dependencies from develop branch. If the problem remains you may try downloading some other version of tor-android. Although I guess it might be a problem with your access to the Maven central, as you as well didn't succeed with downloading tor-android-binary.
Try pausing any VPN you use, drop Tor, check your firewall etc.

Running with --stacktrace won't provide any more useful information. We already know where the problem lays and it's Maven central not being callable.

If any of the above didn't work, the only thing to do I see is to reach to the guardianproject and ask for their support.

@holmesworcester
Copy link
Contributor

holmesworcester commented Nov 27, 2023

@siepra our goal is that the instructions in the README always work deterministically and we should take full responsibility for that once we know some step in the process is flakey.

What are our options here if this repo is flakey?

  1. We could contact our friends at Guardian Project and work with them to track down the problem.
  2. We could mirror the files in a location we control. For example, we can add them to the repo itself or our S3 bucket, and update them as part of the build process in a way such that builds will still work if the repo is not available.
  3. Any other options?

@rajdip-b please let us know when you have ruled out any problems on your end. Thanks for putting in the effort here, and if you get stuck perhaps you could stick with desktop tickets until we sort it out?

@rajdip-b
Copy link
Collaborator Author

I tried again, seems like the issue is with the dependency URL since my internet works fine. One more thing I would like to point out is, it takes nearly 15 minutes to get the environment up and running.

@holmesworcester
Copy link
Contributor

holmesworcester commented Nov 28, 2023

Okay, so two things:

First, see this issue about how India may have been blocking raw.githubusercontent.com: https://github.com/orgs/community/discussions/42655#discussioncomment-7531455

Someone in that issue recommends Proton VPN as a solution, which is free. It also looks like the block has been lifted and will roll out soon. This is truly unbelievable. In a past life I was actually a big part of the effort in the US in 2011/2012 to stop ISP-level censorship like this from going into effect in the US. Good thing we did!

Second, I get a 404 when trying to access the URL in the error message: "https://raw.githubusercontent.com/guardianproject/gpmaven/master/org/webkit/android-jsc-intl/maven-metadata.xml" so maybe there's some other problem.

@siepra does this URL work for you? Should I create an issue in the Guardian Project repo that this is 404'ing?

@siepra
Copy link
Contributor

siepra commented Nov 30, 2023

android-jsc-intl (a javascript core) is bound with react-native, not guardian project so I'm confused with this link you tried, especially that guardian projects' maven repo indeed doesn't host anything under this path (https://github.com/guardianproject/gpmaven/tree/master).

My hypothesis is environment setup hasn't been done right and now gradle confuses maven sources while resolving dependencies.

@rajdip-b It'd be wonderful if you listed the exact steps you take to run the project.

@siepra
Copy link
Contributor

siepra commented Nov 30, 2023

it takes nearly 15 minutes to get the environment up and running

Setting up the environment time depends on the person who performs it (installing SDKs, setting envs, etc.).
Are you sure you didn't mean the initial build time? It will get better with the following builds as there'll be gradle deamons and cache available so don't worry. It also depends on your hardware profile of course.

Anyway, I'm glad it didn't discourage you!

@rajdip-b
Copy link
Collaborator Author

it takes nearly 15 minutes to get the environment up and running

Setting up the environment time depends on the person who performs it (installing SDKs, setting envs, etc.). Are you sure you didn't mean the initial build time? It will get better with the following builds as there'll be gradle deamons and cache available so don't worry. It also depends on your hardware profile of course.

Anyway, I'm glad it didn't discourage you!

Yeah sorry, my bad. I meant the initial build. But the hardware might not ne the issue, since mostly it was downloading a lot of stuff.

@leblowl leblowl self-assigned this Dec 1, 2023
@leblowl leblowl removed their assignment Dec 12, 2023
@EmiM
Copy link
Contributor

EmiM commented Feb 27, 2024

@rajdip-b does the problem still happen to you?

@holmesworcester holmesworcester moved this from Sprint to Backlog - Desktop & Backend in Quiet Feb 27, 2024
@holmesworcester holmesworcester moved this from Backlog - Desktop & Backend to Backlog - Mobile in Quiet Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog - Mobile
Development

No branches or pull requests

5 participants