Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log in Callback Error #17

Open
JasonMKY opened this issue Oct 13, 2023 · 15 comments
Open

Log in Callback Error #17

JasonMKY opened this issue Oct 13, 2023 · 15 comments

Comments

@JasonMKY
Copy link

I added all the links to the callback in Kinde, does it take time to update? I added all necessary links and still get this callback error...
image

Still get this error when trying to log in:
image

@JasonMKY
Copy link
Author

@anand-mukul
Copy link

@JasonMKY clear cache and try again

@JasonMKY
Copy link
Author

@JasonMKY clear cache and try again

Cleared caches and tried in incognito mode, error still there:
image

@anand-mukul
Copy link

@JasonMKY There is problem in your env, Recheck that
Also, share your ..src\lib\utils.ts

@JasonMKY
Copy link
Author

I put everything correctly in environment setup
image

Src/lib/utils.ts file:

import { type ClassValue, clsx } from 'clsx'
import { Metadata } from 'next'
import { twMerge } from 'tailwind-merge'

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

export function absoluteUrl(path: string) {
  if (typeof window !== 'undefined') return path
  if (process.env.VERCEL_URL)
    return `https://${process.env.VERCEL_URL}${path}`
  return `http://localhost:${
    process.env.PORT ?? 3000
  }${path}`
}

export function constructMetadata({
  title = "Quill - the SaaS for students",
  description = "Quill is an open-source software to make chatting to your PDF files easy.",
  image = "/thumbnail.png",
  icons = "/favicon.ico",
  noIndex = false
}: {
  title?: string
  description?: string
  image?: string
  icons?: string
  noIndex?: boolean
} = {}): Metadata {
  return {
    title,
    description,
    openGraph: {
      title,
      description,
      images: [
        {
          url: image
        }
      ]
    },
    twitter: {
      card: "summary_large_image",
      title,
      description,
      images: [image],
      creator: "@joshtriedcoding"
    },
    icons,
    metadataBase: new URL('https://quill-jet.vercel.app'),
    themeColor: '#FFF',
    ...(noIndex && {
      robots: {
        index: false,
        follow: false
      }
    })
  }

@anand-mukul
Copy link

anand-mukul commented Oct 15, 2023

image

Go to... Kinde>Application>Quick Start

Existing codebase

https://pdf2-beta.vercel.app Edit the link

You will get environment vars

@JasonMKY
Copy link
Author

JasonMKY commented Oct 15, 2023

EDIT: Fixed

When I log in/register this error is showing when going to "/dashboard"

image

Error in Log:

Status Code 200

image
image

Code in blue highlight below

PrismaClientKnownRequestError: 
Invalid `prisma.user.findFirst()` invocation:


The table `(not available)` does not exist in the current database.
    at wn.handleRequestError (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:6730)
    at wn.handleAndLogRequestError (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:6119)
    at wn.request (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:5839)
    at async l (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:128:9763)
    at async m (/var/task/.next/server/app/dashboard/page.js:1:8592) {
  code: 'P2021',
  clientVersion: '5.3.1',
  meta: { table: '(not available)' }
}
[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
  digest: '2695897097'
}
PrismaClientKnownRequestError: 
Invalid `prisma.user.findFirst()` invocation:


The table `(not available)` does not exist in the current database.
    at wn.handleRequestError (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:6730)
    at wn.handleAndLogRequestError (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:6119)
    at wn.request (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:123:5839)
    at async l (/var/task/node_modules/.pnpm/@prisma+client@5.3.1_prisma@5.3.1/node_modules/@prisma/client/runtime/library.js:128:9763)
    at async u (/var/task/.next/server/chunks/753.js:1:732)
    at async z (/var/task/.next/server/chunks/951.js:1:13423) {
  code: 'P2021',
  clientVersion: '5.3.1',
  meta: { table: '(not available)' }
}
[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
  digest: '341264739'
}

@suzushi-tw
Copy link

anand

HI anand, first of all thanks for all the otherpost as it helped me overcome some issue. I have no idea if my current problem relate to the other post. First I was getting 500internal error while signing in. And after someadjustment I was able to solve it and get to the registerpage. This time able to register and receive the authentication code (I double checked in kinde that I successfully registered). But then instead of getting routed to the dashboard. I just get 404 Page not found. Any idea on how to solve this?

@anand-mukul
Copy link

anand-mukul commented Oct 16, 2023

Have you watched @joschan21 Tutorials? You can find it here: https://youtu.be/ucX2zXAZ1I0?si=XN9jWmqWNtRJsPUD

Alternatively, did you set up your own .env credentials? I noticed in your code that you haven't made any changes. I recommend updating it according to your .env credentials. Once you do that, you'll be good to go, @suzushi-tw ! 👍

@suzushi-tw
Copy link

Have you watched @joschan21 Tutorials? You can find it here: https://youtu.be/ucX2zXAZ1I0?si=XN9jWmqWNtRJsPUD

Alternatively, did you set up your own .env credentials? I noticed in your code that you haven't made any changes. I recommend updating it according to your .env credentials. Once you do that, you'll be good to go, @suzushi-tw ! 👍

Actually that was just a repo to test eveything out including the domain. I am following the tutorial on local and I have the enviroment variable set up properly as well. An update on what was happening, basically it was telling me images.remotepatterns missing so I setup those in next.config.js. And a bit of trying around, now I can get to the dashboard. I am currently stuck on uploadthing, as it gives me fetch error. Even though I can see the file being uploaded into the server. The error looks like the following pic.
Screenshot 2023-10-16 105713

I have rewatched the video about this part a few times and couln't figure it out yet. Any suggestions?

@anand-mukul
Copy link

anand-mukul commented Oct 16, 2023

Please give it a star and check out this repository: https://github.com/anand-mukul/PDFNinja. Since I am unable to find your code, I can't identify the exact issue.

Check 2nd line of your picture it's https://https://stellar......

@KLGH24
Copy link

KLGH24 commented Oct 22, 2023

@anand-mukul I checked out PDFNinja and I am unable to interact with the pdf. It's the same error I am getting 404. Is this due to Pinecone changes not allowing name spaces for free anymore?

@ck18sss
Copy link

ck18sss commented Dec 27, 2023

I added all the links to the callback in Kinde, does it take time to update? I added all necessary links and still get this callback error... image

Still get this error when trying to log in: image

I'm still struggling with this issue unfortunately. My auth won't work, keep getting a callback error when everything is correct.

@AutomatykaJava
Copy link

You can try alternative way to remove and add callbacks in kinde. Did not tried it yet, but in their documentation there are endpoints to do it. Maybe this is a way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants