TypeError: Error.captureStackTrace is not a function
Unanswered
German Longhaired Pointer posted this in #help-forum
German Longhaired PointerOP
"use client"
import { useSearchParams } from 'next/navigation'
import { getToken
} from '@/services/discordAuth'
import { getUser } from '@/services/discordAuth'
import { useEffect } from 'react'
export default function Callback() {
const SearchParams = useSearchParams()
const code = SearchParams.get('code')
const loadData = async () => {
const token = await getToken(code)
const user = await getUser(token)
console.log(user)
}
useEffect(() => {
loadData()
}, [])
return(
<p> ok your code is : {code} </p>
)
}given above is my code, and i get this error TypeError: Error.captureStackTrace is not a function
5 Replies
German Longhaired PointerOP
if anyone helps me fix this that would be great
whenever i open this website on firefox
i get that error
when i run the same thing on brave
it works smooth