TryQuiet / quiet

A private, p2p alternative to Slack and Discord built on Tor & IPFS
https://www.tryquiet.org
GNU General Public License v3.0
1.94k stars 86 forks source link

Dependency error during mobile local development #2113

Open rajdip-b opened 10 months ago

rajdip-b commented 10 months ago

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:

holmesworcester commented 10 months ago

@siepra any ideas?

siepra commented 10 months ago

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 https://github.com/TryQuiet/quiet/pull/2024 I think we'll merge in into develop shortly

rajdip-b commented 10 months ago

@siepra Sure.

rajdip-b commented 10 months ago

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

Any ideas?

holmesworcester commented 10 months ago

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

siepra commented 9 months ago

@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 commented 9 months ago

@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 commented 9 months ago

@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 commented 9 months ago

@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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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.

EmiM commented 6 months ago

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