Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Metadata API Not Working #46875

Closed
1 task done
rohanreddy888 opened this issue Mar 7, 2023 · 13 comments
Closed
1 task done

Metadata API Not Working #46875

rohanreddy888 opened this issue Mar 7, 2023 · 13 comments
Labels
bug Issue was opened via the bug report template. Metadata Related to Next.js' Metadata API. please add a complete reproduction Please add a complete reproduction.

Comments

@rohanreddy888
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

I have added the Metadata OG in the page.tsx the content of the data and not showing on any of the OG Checkers.

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js)

Link to the code that reproduces this issue

https://github.com/Quillhash/QuillAudits-next-js

To Reproduce

Describe the Bug

I have added the Metadata OG in the page.tsx the content of the data and not showing on any of the OG Checkers.

Expected Behavior

The contents of the Meta tag should showup in the https://www.opengraph.xyz/

Which browser are you using? (if relevant)

Brave

How are you deploying your application? (if relevant)

Vercel

@rohanreddy888 rohanreddy888 added the bug Issue was opened via the bug report template. label Mar 7, 2023
@rohanreddy888
Copy link
Author

PrevIous Scape
FireShot Capture 005 - Sharing Debugger - Meta for Developers - developers facebook com

After Updating Next Version (With Head.JS)
FireShot Capture 006 - Sharing Debugger - Meta for Developers - developers facebook com

@rohanreddy888
Copy link
Author

With MetaData og:image missing
FireShot Capture 007 - Sharing Debugger - Meta for Developers - developers facebook com

@balazsorban44 balazsorban44 added the Metadata Related to Next.js' Metadata API. label Mar 7, 2023
@balazsorban44
Copy link
Member

The reproduction is private, and no environment information was provided

@balazsorban44 balazsorban44 added the please add a complete reproduction Please add a complete reproduction. label Mar 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate.

Why was this issue marked with the please add a complete reproduction label?

To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository (template), but you can also use a tool like CodeSandbox or StackBlitz.

To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue.

Please test your reproduction against the latest version of Next.js (next@canary) to make sure your issue has not already been fixed.

I added a link, why was it still marked?

Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.

What happens if I don't provide a sufficient minimal reproduction?

Issues with the please add a complete reproduction label that receives no meaningful activity (e.g. new comments with a reproduction link) are automatically closed and locked after 30 days.

If your issue has not been resolved in that time and it has been closed/locked, please open a new issue with the required reproduction.

I did not open this issue, but it is relevant to me, what can I do to help?

Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps. Furthermore, you can upvote the issue using the 👍 reaction on the topmost comment (please do not comment "I have the same issue" without reproduction steps). Then, we can sort issues by votes to prioritize.

I think my reproduction is good enough, why aren't you looking into it quicker?

We look into every Next.js issue and constantly monitor open issues for new comments.

However, sometimes we might miss one or two due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.

Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.

Useful Resources

@joulev
Copy link
Contributor

joulev commented Mar 7, 2023

In the latest version of Next.js at least you can add og:image just fine (#46570) so this is 99% a bug in your code... For the record open graph is working perfectly in my website also using metadata.

@rohanreddy888
Copy link
Author

rohanreddy888 commented Mar 7, 2023

In the latest version of Next.js at least you can add og:image just fine (#46570) so this is 99% a bug in your code... For the record open graph is working perfectly in my website also using metadata.

Do you mean add image in the openGraph object like this?

export const metadata: Metadata = {
  title: 'Web3 Hack Statistics, Hackerboard - QuillAudits',
  description:
    'Get statistics and deep analysis of recent crypto hacks, vulnerabilities, and attack vectors around the web3 world.',
  openGraph: {
    title: 'Web3 Hack Statistics, Hackerboard - QuillAudits',
    url: 'https://www.quillaudits.com/tools/hackerboard',
    description:
      'Get statistics and deep analysis of recent crypto hacks, vulnerabilities, and attack vectors around the web3 world.',
    image: 'https://quillaudits.com/api/og?amount=6B&number=1000',
    images: [
      {
        url: 'https://quillaudits.com/api/og?amount=6B&number=1000',
        secureUrl: 'https://quillaudits.com/api/og?amount=6B&number=1000',
        alt: 'Web3 Hack Statistics, Hackerboard - QuillAudits',
        width: 1200,
        height: 630,
        type: 'image/png',
      },
    ],
    locale: 'en-US',
    type: 'website',
  },
  alternates: {
    canonical: 'https://www.quillaudits.com/tools/hackerboard',
  },
  twitter: {
    card: 'summary_large_image',
    title: 'Web3 Hack Statistics, Hackerboard - QuillAudits',
    description:
      'Get statistics and deep analysis of recent crypto hacks, vulnerabilities, and attack vectors around the web3 world.',
    creator: '@QuillAudits',
    images: ['https://quillaudits.com/api/og?amount=6B&number=1000'],
  },
  robots: {
    index: true,
  },
};

@balazsorban44
Copy link
Member

@rohanreddy888 please make your repo public. 🙏 (or create a minimal public reproduction).

@rohanreddy888
Copy link
Author

@rohanreddy888 please make your repo public. 🙏 (or create a minimal public reproduction).

Hey @balazsorban44 , I have tried to create a new next project and add the metadata its working. But its not working on my current project.

@joulev
Copy link
Contributor

joulev commented Mar 7, 2023

Doesn't that confirm it's your code's bug and not a Next.js bug?

@rohanreddy888
Copy link
Author

Doesn't that confirm it's your code's bug and not a Next.js bug?

Nope that doesn't answer there should be some error show where the issue is and why its not working.

@Franetse7
Copy link

Franetse7 commented Mar 7, 2023 via email

@rohanreddy888
Copy link
Author

After 5 hours of debugging found the problem with the my custom tracking code i had in the project once i removed it its working fine now. But dont know how that is connected to the Metadata API. If you guys have any idea reply here. Thank you.

@Confuze
Copy link

Confuze commented Mar 8, 2023

Do you think this could be at all related to #46899?

@vercel vercel locked and limited conversation to collaborators Mar 8, 2023
@balazsorban44 balazsorban44 converted this issue into discussion #46916 Mar 8, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Issue was opened via the bug report template. Metadata Related to Next.js' Metadata API. please add a complete reproduction Please add a complete reproduction.
Projects
None yet
Development

No branches or pull requests

5 participants