Next Auth TypeError: Invalid URL - javascript

I keep receiving when I run my project - Nextjs. I think it about Next Auth, but don't actually know what to do. I am using version 4.3.1
Need help with next-auth
I have tried changing my next-auth version but no. Yet when I deployed in vercel, it went through

If you don't have NEXTAUTH_URL set in your .env file you will get this error. However vercel will work as next-auth automatically sets it when deployed to vercel.
https://next-auth.js.org/configuration/options#nextauth_url
If you do have NEXTAUTH_URL set then my best guess is the url is wrong in some way. Maybe missing http://?

Related

Laravel Vuejs Uncaught (in promise) ChunkLoadError: Loading chunk blogs-component failed

I have a Laravel + Vuejs project and while everything works fine on local development, 2 pages are throwing the ChunkLoadError.
I have looked at other issues on SO, and checked my output path, file is really there.
Page is here : https://dev.trouveruncouvreur.ca/guide-toiture and same for https://dev.trouveruncouvreur.ca/city/d-soumission-couvreur-toiture-Brossard
Error is here :
The chunk is available if you click on the link https://dev.trouveruncouvreur.ca/js/blogs-component.js
Edit: I deleted the project from the dev server, and reinstalled everything without success. I keep having the same issue. I did install on another server I have access to, and the error is gone, pages are all served correctly. We just found out client on dev server is using Cloudflare, so once we have acces, we can delete cache and see how it goes.
In this case, Cloudflare's cache was the culprid. All vues files/chunk are now correctly served.

Google Cloud Storage - "Error: Could not load the default credentials"

While developing my app in Node.js, I decided to persist my data by using the Google Cloud Storage client libraries.
I came across the error mentioned in the title when uploading to storage:
Error: Could not load the default credentials
I did some digging, and figured out how to solve the issue:
Navigating to google cloud console credentials and creating a service account.
Setting the role for the service account to have full object permissions across my project and my buckets
Creating a key for the service account and downloading the associated .json file
Installing Cloud SDK and running the commands:
gcloud auth application-default login
gcloud config set project [MY_PROJECT_ID]
gcloud auth activate-service-account --key-file=C:/path/to/json/file
In my code passing in the .json credentials file into my new client instance:
const storage = new Storage({keyFileName: "auth.json"})
These steps described fixed the issue... in development. When I deployed my app to production the same error message comes back
I tried a few things to solve the issue. I assumed it was an issue with my web host: A2. After talking with their tech support they reassured me my file paths are correct inside their file structure, but they would not help me troubleshoot the credentials error otherwise.
So, why would my credentials be working just fine in development, but then suddenly stop working in production? Is it because I had the localhost as the callback URI instead of the domain name (or something)? Do I need to specify the domain somewhere in SDK or in the cloud console?
The error message points me to https://cloud.google.com/docs/authentication/getting-started, but I have read and reread the documentation many times, so if someone can point me to the specific place in the docs that says what I need to do that would be appreciated, but be aware that I have done my homework and I RTFM, but I am still unable to solve this issue.

getting javax.mail.AuthenticationFailedException on heroku

I am Using Heroku to deploy my java spring boot backend which utilizes the javamailsender. When testing locally before deployment, I was able to send emails and receive emails thru the application. But, ever since I deployed it on heroku, I have been receiving error whenever I try to send email.
Error Sending Email: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 534-5.7.9 Application-specific password required. Learn more at
2020-07-17T01:00:29.110458+00:00 app[web.1]: 534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor r188sm8440648qkf.128 - gsmtp
2020-07-17T01:00:29.110462+00:00 app[web.1]:
I have seen plenty of articles/discussion forum where users encounter such problem and I tried to resolve using the solution that was given but was unsuccessful. I have the 2-Step-Verification on and turned on the less secure app but no luck. I also saw that doing App Password helped solved the issue but didn't really understand how to go about that in terms of my app on heroku. I have react frontend hosted on firebase and spring boot backend hosted on heroku. Any help would be appreciated. Thank you!
Nvm, I figured out what was causing this error. I guess I had to create an App Password and use that password that was created inside my application.properties.

what's this weird : JSON Parse error: Unexpected identifier "Tunnel"

i was trying to fetch some data from the server to display in the react native app. it was worked before but i don't know what happened after, i added a console.log in the catch of fetch.. it showing me error like
JSON Parse error: Unexpected identifier "Tunnel"
- node_modules/promise/setimmediate/core.js:37:14 in tryCallOne
- node_modules/promise/setimmediate/core.js:123:25 in
- ... 8 more stack frames from framework internals
fetch(`${this.props.baseUrl}/products?page=${this.state.page}&per_page=10`,{
method:"get",
headers:{
AUTH_TOKEN: this.props.AUTH_TOKEN
}
}).then(res=>res.json()).then(data=>{
if(data.success==true){
this.page++;
this.props.toggleLoading();
this.props.loadProducts(data.products);
}
}).catch(err=>console.log(err)); //error here ..i dont know why that's throwing this kinda error
it's because of ngrok stopped its tunnel, so your api returning some text/html instead json data,
For me it was forgetting to update the ngrok url I had specified in a variable. Updating it fixed the issue
This can also be the result of starting to use a VPN:
disconnect from the VPN
restart ngrok
use new ngrok url
Hi are you using dotenv for your env variables? If you are, I also had the same error and i found out it was because my env variables were not updating which caused the tunnel url to not be found. You can try running ur app using this command: expo r -c or refer to the solutions in this link https://github.com/zetachang/react-native-dotenv/issues/24

Mean app login not working on heroku

I have followed many tutorials on how to get mongodb and MEAN to work on heroku, and none of them have worked for me, I keep getting the 503 application error.
First I create the app, I do heroku addons:docs mongolab in the commandline, and after that I check my config and change my code so the mongoose connection is changed to the config string like this:
mongoose.connect(process.env.MONGOLAB_URI || mongodb://example:example#ds053312.mongolab.com:53312/todolist');
the second part is just an example, the one I use is the one with my information.
So after this I push my app to heroku, but when I try to run it, it still gives me the application error, and in f12 it says it's
Failed to load resource: the server responded with a status of 503
(Service Unavailable)
https://myapp.herokuapp.com/favicon.ico
What am I doing wrong? I have tried everything and none of the tutorials are working for me
EDIT: I have managed to get rid of the error by doing the following:
$ git init
$ git add .
$ git commit -m "initial version"
$ heroku apps:create
however, now that my app loads, it appears that the login and sign up features of my app doesn't work, I fill out the sign in/log in form and submit but the page just stays where it is without changing. Is there something else I was supposed to do to get these features to work?
I came here because my Heroku - deploy Login wasn't working, but Localhost was. Turns out I forgot to change the Login POST route.

Categories

Resources