timothymiller / t4-app

A powerful cross-platform UI toolkit for building actually native iOS, Android, macOS, Windows, Linux, and Progressive Web Apps with React (Native).
https://t4stack.com
MIT License
1.42k stars 75 forks source link

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

Open shariandabre opened 3 months ago

shariandabre commented 3 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 2 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