Closed lfrallon closed 4 weeks ago
@lfrallon seems like your problem is caused by azurite, if you use emulated storage (azurite), the connection string to azurite is default to local machine, which is 127.0.0.1, and port 10000 is spesific to Azurite Blob Service.
When you test to download the code-push update from server, the server returning blob url with azurite host as is. And that's why your mobile device can't connect to 127.0.0.1 of your host machine. The easiest way to make it work is to use azure blob storage. but if you want to try more deeper, take a look at my repository here
it just simple code-push-server fork, i'm just adding ENVIRONMENT var "AZURITE_CONNECTION_STRING" to customize azurite connection string
you just need to customize the host of azurite connection string (maybe use your local wifi address for your machine), and tune up your azurite setting if needed. i hope it help
@lfrallon seems like your problem is caused by azurite, if you use emulated storage (azurite), the connection string to azurite is default to local machine, which is 127.0.0.1, and port 10000 is spesific to Azurite Blob Service.
When you test to download the code-push update from server, the server returning blob url with azurite host as is. And that's why your mobile device can't connect to 127.0.0.1 of your host machine. The easiest way to make it work is to use azure blob storage. but if you want to try more deeper, take a look at my repository here
it just simple code-push-server fork, i'm just adding ENVIRONMENT var "AZURITE_CONNECTION_STRING" to customize azurite connection string
you just need to customize the host of azurite connection string (maybe use your local wifi address for your machine), and tune up your azurite setting if needed. i hope it help
@azrulhaifan that's also what I thought.
Thank you. I'll check it then and also currently looking for different solutions.
@azrulhaifan
@lfrallon seems like your problem is caused by azurite, if you use emulated storage (azurite), the connection string to azurite is default to local machine, which is 127.0.0.1, and port 10000 is spesific to Azurite Blob Service.
When you test to download the code-push update from server, the server returning blob url with azurite host as is. And that's why your mobile device can't connect to 127.0.0.1 of your host machine. The easiest way to make it work is to use azure blob storage. but if you want to try more deeper, take a look at my repository here
it just simple code-push-server fork, i'm just adding ENVIRONMENT var "AZURITE_CONNECTION_STRING" to customize azurite connection string
you just need to customize the host of azurite connection string (maybe use your local wifi address for your machine), and tune up your azurite setting if needed. i hope it help
Hello, there! I am using your fork, but when I am trying to login, I am gettting the following error instead of the access key
Account not found.
Have you registered with the CLI?
If you are registered but your email address has changed, please contact us.
in my browser, here is my .env file with AZURITE_CONNECTION_STRING
EMULATED=true SERVER_URL=http://10.13.100.133:3000 AZURITE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://10.13.100.133:10000/account1;QueueEndpoint=http://10.13.100.133:10001/devstoreaccount1;TableEndpoint=http://10.13.100.133:10002/devstoreaccount1;"
and how do we use the blob storage solution that you pointed out? any help is very much appreciated
@alisyd I think you need to register again like code-push-standalone register http://10.13.100.133:3000
.
Account not found. Have you registered with the CLI? If you are registered but your email address has changed, please contact us.
try to re-register like what @lfrallon say, or logout than relogin. if you can't achieve it, try to remove your CLI profile manually. it placed somewhere on your home directory with the name ".code-push.config" (on mac os), than try to relogin again. make sure you have setted up github oath variable.
and how do we use the blob storage solution that you pointed out? any help is very much appreciated
if you setup a correct AZURITE_CONNECTION_STRING, than your codepush server will serve the blob url (for downloading code update) from it, you just need to make sure the azurite server are published & can be accessed via internet.
and take a look your connection string at :
BlobEndpoint=http://10.13.100.133:10000/account1
i think the correct string is :
BlobEndpoint=http://10.13.100.133:10000/devstoreaccount1
one simple way to make sure your azurite blob server are exposed to internet is by access your IP:PORT on browser, than it will show xml page
Account not found. Have you registered with the CLI? If you are registered but your email address has changed, please contact us.
try to re-register like what @lfrallon say, or logout than relogin. if you can't achieve it, try to remove your CLI profile manually. it placed somewhere on your home directory with the name ".code-push.config" (on mac os), than try to relogin again. make sure you have setted up github oath variable.
and how do we use the blob storage solution that you pointed out? any help is very much appreciated
if you setup a correct AZURITE_CONNECTION_STRING, than your codepush server will serve the blob url (for downloading code update) from it, you just need to make sure the azurite server are published & can be accessed via internet.
and take a look your connection string at :
BlobEndpoint=http://10.13.100.133:10000/account1
i think the correct string is :
BlobEndpoint=http://10.13.100.133:10000/devstoreaccount1
one simple way to make sure your azurite blob server are exposed to internet is by access your IP:PORT on browser, than it will show xml page
Yep that was it, Changed the connection string and things are working fine. Thanks for the help!
Hello
@alisyd @azrulhaifan @lfrallon
What should I give to AccountKey
in the url below?
DefaultEndpointsProtocol=http;AccountName=account1;AccountKey=base64key;BlobEndpoint=http://127.0.0.1:10000/account1;QueueEndpoint=http://127.0.0.1:10001/account1;TableEndpoint=http://127.0.0.1:10002/account1;
If the AccountKey is incorrect, the codepush server will throw the following error:
Unknown storage error.
Error: Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature.
RequestId:90e2171e-b288-4e91-8aae-413975826666
Time:2024-11-04T07:34:47.929Z
Thanks in advance.
AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==; BlobEndpoint=http://MyIP:9000/devstoreaccount1
I changed the IP and port for queue and table and blob and accountKey, and confirmed that it works normally until the update check.
However, It still see 127.0.0.1 like below when downloading. ㅜㅜ
LOG [CodePush] Sync already in progress.
LOG [CodePush] Checking for update.
LOG [CodePush] Awaiting user action.
LOG [CodePush] Downloading package.
LOG [CodePush] An unknown error occurred.
LOG [CodePush] Failed to connect to /127.0.0.1:10000
@alisyd @azrulhaifan @lfrallon
What could have gone wrong?
AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==; BlobEndpoint=http://MyIP:9000/devstoreaccount1
I changed the IP and port for queue and table and blob and accountKey, and confirmed that it works normally until the update check.
However, It still see 127.0.0.1 like below when downloading. ㅜㅜ
LOG [CodePush] Sync already in progress. LOG [CodePush] Checking for update. LOG [CodePush] Awaiting user action. LOG [CodePush] Downloading package. LOG [CodePush] An unknown error occurred. LOG [CodePush] Failed to connect to /127.0.0.1:10000
@alisyd @azrulhaifan @lfrallon
What could have gone wrong?
Using Azurite connection string in .env works with @azrulhaifan fork of code-push-server, if you are using the one from this repo, It would not work
@alisyd @azrulhaifan
Hello, Here's what I did:
I cloned this repository below.
https://github.com/azrulhaifan/code-push-server-freedom.git
.env
EMULATED=true
LOGGING=true
SERVER_URL={IP:8090}
GITHUB_CLIENT_ID={}
GITHUB_CLIENT_SECRET={}
AZURITE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://{IP}:9000/devstoreaccount1;QueueEndpoint=http://{IP}:9001/devstoreaccount1;TableEndpoint=http://{IP}:9002/devstoreaccount1"
I gave it 0.0.0.0 to accept remote requests.
azurite --debug ./debug.log --blobHost 0.0.0.0 --blobPort 9000 --queueHost 0.0.0.0 --queuePort 9001 --tableHost 0.0.0.0 --tablePort 9002
# Even if I change 0.0.0.0 to {IP}, the result is still the same and it fails.
azurite --debug ./debug.log --blobHost {IP} --blobPort 9000 --queueHost {IP} --queuePort 9001 --tableHost {IP} --tablePort 9002
PORT=8090 npm run start:env
Checking for updates was successful, but downloading still fails with IP address 127.0.0.1. At app
LOG [CodePush] Sync already in progress.
LOG [CodePush] Checking for update.
LOG [CodePush] Awaiting user action.
LOG [CodePush] Downloading package.
LOG [CodePush] An unknown error occurred.
LOG [CodePush] Failed to connect to /127.0.0.1:10000
Hi there,
I encountered an error when executing
code-push-standalone release-react <app-name> android -d Staging --mandatory true --targetBinaryVersion "<app-version>"
.This is the response of the code push server api:
Though I can see the releases on the deployment history,
react-native-code-push
is unable to fetch the update.Code Push client logs:
Environment Setup
Using local development setup on linux machine (Ubuntu 24.04.1 LTS).
.env
Azurite running on Docker container
Engine version