Closed Ashistalin06 closed 1 year ago
Hello.
It seems there might be a misunderstanding about how Lexicon works.
You wrote:
if my development machine is on then only it will fetch me things from server otherwise it won't work.
You also filled out this part:
Have you deployed it somewhere? If so, what domain or IP address did you deploy it at?
Using the same code. Did not make any changes. Will make changes after I am able to figure out the fetching process from the server.
This is a hint to what's going wrong, since you specifically wrote that you didn't host the Prose GraphQL server (api/
) anywhere. You have to deploy the Prose GraphQL server somewhere if you want it to work when your development machine is off.
I would recommend reading the documentation in a bit more detail to ensure you better understand the process.
This link illustrates that the mobile app must be able to connect your deploy Prose server in order for it to work.
This Github comment also goes into this a bit:
If your MOBILE_PROSE_HOST is pointed at localhost on your development machine, how could your mobile device ever access it? If someone tries to download your app from the Play Store, what are they connecting to? They wouldn't be able to connect to your local development machine.
To expand on that, if you turn off your development machine, and Prose is only running on your development machine, then it's expected that the app wouldn't work because it doesn't have anything to connect to. Additionally, if the app was published, no one else who downloaded the app would be able to use it, because they won't be connected to the same network that your development machine is on.
You need to deploy Prose somewhere publicly accessible if you want it to work without your development machine.
This link goes over the process of doing so.
the end goal of this section is to have a working Prose server accessible on the open internet.
And this link goes into the specifics of it.
Describe the bug
I have followed every step mentioned in the lexicon doc. I am stuck at creating a build process from more than a month. I tried using the expo build: android command mentioned in docs but I would like to know, if my development machine is on then only it will fetch me things from server otherwise it won't work.
REQUIRED: Include the contents of
api/.env
andfrontend/.env
If you are manually overriding any environment variables when running the package scripts, include those as well.
api/.env
frontend/.env
REQUIRED: answer the following questions:
I was running through metro and I could see it was getting connected to the server and fetching all the channels, posts etc.
Mobile device.
To Reproduce
Steps to reproduce the behavior:
build: android
command, after installing the apk in mobile.. the app is able to run only when the development machine is turned on. According to expo team, they recommended me using eas build.eas build
command and created an apk. After installing it in my mobile, it was no longer linked to my development machine as claimed by Expo team. But also I was not able to get connected to the server which were providing me channels, posts, users etc.Expected behavior
I want the app to run like it is running in development machine so that I can edit it later and publish the same in play store.
Environments
Windows
Desktop (please complete the following information):
Smartphone (please complete the following information):
GraphQL API (please complete the following information):
Please indicate where the Prose GraphQL API is running.
Are you only running it locally on your development machine?
Have you deployed it somewhere? If so, what domain or IP address did you deploy it at?