Fetch() async/await method in a local NextJs 13 app getting object “undefined”when trying to build for prod but works in dev - error-handling

I’m learning NextJS 13 and trying out fetch()/async/await in a simple demo app running on a local Docker container. I’m using fetch()/async/await hitting a GraphQL api on another local container. Everything works great when running “npm run dev” and I’m now wanting to try out the workflow of Next’s static output and pushing to production but when I try generating the app via “npm run build” none of the api calls work because my code which is trying to display for example “data.item.name” and can’t select “item.name” on object “undefined” and the build fails. I retry running “npm run dev” and all works perfectly fine again.
I’ve double checked that my api is responding with Postman and all seems to be good. I did notice that when running the NextJS 13 app within Docker it wanted me to use the container ID of the api container ie “http://nginx/api” vs “http://localhost:8888” when making the fetch() call which had me hung up for a few days. But once I got that working the app and the fetch() calls worked great.
I’m brand new to Next and React so this one has really had me stuck.

Related

How to get hot reloading working with React.js project template in VS2022 Mac

I am using the React.js project template in VS2022 for Mac and the application starts up fine when run with “Start Debugging” or “Start Without Debugging”. When making changes to the React front end code, the page refreshes and the changes are instantly viewable. However, when making any changes to the backend API code, you have to stop and restart in Visual Studio before the changes are reflected in the API calls.
I have also tried running the application with “dotnet watch” from the terminal and in this case I can see the API being re-compiled in the output window when a change is made to the API code, but then it seems to kill the dev proxy server because I am not able to refresh the page as it just returns “The site can’t be reached” (I can see the bash process getting killed in activity monitor, which I think is hosting the dev proxy server). I have to restart the application again in Visual Studio to get it working and see the changes to the API code.
Is there a way when using the SPA proxy in VS 2022 so that you can make changes to either the front end or back end code and have those changes hot reloaded?

Quarkus app runs perfectly on local but does not respond to any request on windows server

I have a simple quarkus api app. I've tested the app on my local machine and its running fine. But when i try to run the same app in windows server it starts perfect but does not respond to any of my api request. It is not showing any error or problems. I've tried multiple ways to run the app also through package and jar files but all led to same result. screenshot of the palce where app gets stuck

Facebook oauth/access_token call works perfectly on local machine, but fails on dev server

Fighting a weird situation. We are developing a Facebook app and I have run into a strange issue. When our application sends out the oauth/access_token call, it works perfectly on my local environment, but returns a 400 error when called from our dev server. I've checked the calls from the two environments against each other and they are identical, yet one works and the other fails completely.
Help is appreciated.

How to create a shopify app dev environment

I'm building an embedded shopify app and I struggle to test it as embedded app because it's veeeery slow. I started my app following the official guide of creating an app with node & nextjs and I'm still using both but i'm considering getting rid of nextjs and using just react since it feels veeery slow and so heavy for ngrok to transfer all the files to the shopify iframe...
What would you recommend to work smoothly with shopify when building an embedded app?
(I'm mostly working locally but I still need to often go check that it works well inside the admin & to use shopify-app-bridge library)
if ngrok is slow for you, i would suggest heroku for deployment and testing,
create new application at heroku, you can also connect it with your github and use automatic deploy when you push your code

Program showing fine in browser but fails to load resources in electron window

Currently working on a project and everything was working fine. Then suddenly after rebooting from a power cut whilst working on said project, the electron application has since failed to load any online resources. It works perfectly fine when on a native browser using localhost but will fail to load any online resources on the electron application version.
Initially, I thought it was a firewall issue but changing settings has not changed anything. I've reset router/pc multiple times to no avail.
The error recieved for any online resource is GET [URL] net::ERR_EMPTY_RESPONSE
Edit: Here is a screenshot of the error displayed in electron: