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

Mobile app doesn't compile #2053

Closed
alexarsh opened this issue Jun 11, 2020 · 12 comments
Closed

Mobile app doesn't compile #2053

alexarsh opened this issue Jun 11, 2020 · 12 comments

Comments

@alexarsh
Copy link

alexarsh commented Jun 11, 2020

While trying to run 'device="test" make run.ios', getting the following error:

/tmp/berty/js/.env.development
GO111MODULE=off go get golang.org/x/mobile/cmd/gomobile
cd /private/tmp/berty/js/packages/berty-app && gomobile init
mkdir -p /private/tmp/berty/js/packages/go-bridge/ios/Frameworks
GO111MODULE=off gomobile bind -o /private/tmp/berty/js/packages/go-bridge/ios/Frameworks/Bertybridge.framework -v -target ios berty.tech/berty/go/framework/bertybridge
gomobile: gobind was not found. Please run gomobile init before trying again.
make: *** [/private/tmp/berty/js/packages/go-bridge/ios/Frameworks] Error 1

'gomobile init' was run and 'gomobile bind' command exists.
Any ideas what can be done?

@aeddi
Copy link
Member

aeddi commented Jun 11, 2020

It seems to be a problem with go / gomobile.

Are your go env variables set correctly?
Is gobind bin present in your $GOPATH/bin?
Has $GOPATH/bin been added to your path?

@alexarsh
Copy link
Author

Yes. Here it is:

% ls -l $GOPATH/bin/
total 34320
-rwxr-xr-x 1 alex staff 7783584 Jun 11 15:36 gobind
-rwxr-xr-x 1 alex staff 9781764 Jun 11 15:36 gomobile

@aeddi
Copy link
Member

aeddi commented Jun 11, 2020

Has $GOPATH/bin been added to your PATH env variable?

@alexarsh
Copy link
Author

alexarsh commented Jun 11, 2020

Yep. That one was missing. Now when the app loads I see the following error in the simulator:
"No Bundle URL present"
What am I missing?

@aeddi
Copy link
Member

aeddi commented Jun 11, 2020

Is metro running as mentioned in the README?
https://github.com/berty/berty/tree/master/js#1-run-required-services

GitHub
Berty is a secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network - berty/berty

@alexarsh
Copy link
Author

Metro is not running indeed. Running 'make start.metro' gives the following exception:

const cmd = _commander().default.command(command.name).action(async function handleAction(...args) {
^^^^^

SyntaxError: missing ) after argument list
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/private/tmp/berty/js/packages/berty-app/node_modules/react-native/cli.js:13:11)
make: *** [start.metro] Error 1

@aeddi
Copy link
Member

aeddi commented Jun 11, 2020

Can you install/update to a recent version all the requirements listed in the README?
The similar problems I find on the subject seem to be due to a too old version of node for example.

@alexarsh
Copy link
Author

Yes. It was a node version. I think it can be good to update the README with the exact dependencies and versions.
The next problem is how to run 2 simulators simultaneously?
When I follow the README, every new instance runs in the same simulator for some reason, although I give them different names

@aeddi
Copy link
Member

aeddi commented Jun 11, 2020

Is the name you give them the name of a device/simulator on your machine?

You can list the installed simulators using xcrun simctl list devices https://reactnative.dev/docs/running-on-simulator-ios#specifying-a-device

## Starting the simulator

@alexarsh
Copy link
Author

Yep. Now it's working with the right names.
So I am able to start 2 simulators and login. Is there some explanation how to use the app?
I would like to write messages between 2 simulators.
For some reason I see that the "send" button is disabled in sample groups and I have no option to add users (can't share QR code in simulator) or add a new group.
So how can it be done?

@aeddi
Copy link
Member

aeddi commented Jun 11, 2020

When you are on a simulator:

  • You can copy the link using this button:

Screenshot_2020-06-11_at_18 04 07

Screenshot_2020-06-11_at_18 04 11

  • And you can paste it in this hidden field:

Screenshot_2020-06-11_at_18 04 20

Screenshot_2020-06-11_at_18 04 48

However, since the questions become off-topic now that the app is compiled I will close this issue, please open another one to ask questions about using the app.

@aeddi aeddi closed this as completed Jun 11, 2020
@alexarsh
Copy link
Author

Sure. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants