timothymiller / t4-app

Full stack meta-framework for building iOS, Android, and Progressive Web Apps with Tamagui and deploying to Cloudflare.
https://t4stack.com
MIT License
1.5k stars 84 forks source link

Not able to access API from expo app or phone browser #155

Open shariandabre opened 5 months ago

shariandabre commented 5 months ago

I had made some changes to the project. I am not able to make request from an expo prebuild app. All my tRPC request give me this error. WARN [TRPCClientError: Network request failed] But when I run the expo app in the web I face no issues.

nickfujita commented 4 months ago

Had this same issue. Seems it was caused by a breaking change in wrangler which no longer makes the dev server available on your local machine ip by default, but instead limits it to only be accessed on localhost.

You now need to update api dev command with the following: https://github.com/timothymiller/t4-app/blob/master/packages/api/package.json#L7

wrangler dev --ip 0.0.0.0

Filed a PR to fix this: https://github.com/timothymiller/t4-app/pull/158