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

[bug] Projects not showing deploy button with newer versions of sanity #60

Open
tim-soft opened this issue Nov 26, 2024 · 15 comments
Open
Labels
question Further information is requested

Comments

@tim-soft
Copy link

Hey @ndimatteo 👋

Thank you for the plugin, its incredibly useful!

Unfortunately something appears to have broken recently -- im not sure if this has to do with Vercel or newer versions of sanity but as of this writing I am trying with [email protected] and [email protected]

Screenshot 2024-11-25 at 8 03 01 PM

Projects show as a list with no deployment buttons

@ndimatteo
Copy link
Owner

Hey there @tim-soft it's a bit difficult to tell what the issue is based on the info you provided.

It doesn't look as if any of the required fields were filled out properly, notably the Webhook URL appears to be a placeholder (note the: <project-key-redacted> bit).

If all deploy fields are filled out correctly (including a token with proper access) you shouldn't have any issue with the current version of this plugin.

If you're still experiencing issues, could you provide a bit more info on the steps you are taking?

@ndimatteo ndimatteo added the question Further information is requested label Nov 29, 2024
@tim-soft
Copy link
Author

tim-soft commented Nov 29, 2024

Yes, I removed the project key for the sake of the screenshot

My project worked perfectly with this plugin, then at some point between sanity upgrades, the plugin stopped working
I tried generating new keys + re-adding the project, the sanity/plugin config has not changed

I dont see any errors in the chrome devtools/console

here is my sanity config

import { defineConfig, PluginOptions } from 'sanity';
import { structureTool } from 'sanity/structure';
import { unsplashImageAsset } from 'sanity-plugin-asset-source-unsplash';
import { visionTool } from '@sanity/vision';
// Go to https://www.sanity.io/docs/api-versioning to learn how API versioning works
import { apiVersion, dataset, projectId, studioUrl } from './sanity/lib/api';
import { googleApiKey } from '@/app/data/contactInfo';
import { locate } from '@/sanity/plugins/locate';
import { presentationTool } from 'sanity/presentation';
import { schema } from './sanity/schema/schema';
import { vercelDeployTool } from 'sanity-plugin-vercel-deploy';
import { youtubeInput } from 'sanity-plugin-youtube-input';

export default defineConfig({
    basePath: studioUrl,
    dataset,
    locate,
    plugins: [
        structureTool(),
        // Vision lets you query your content with GROQ in the studio
        // https://www.sanity.io/docs/the-vision-plugin
        process.env.NODE_ENV === 'development' &&
            visionTool({ defaultApiVersion: apiVersion }),
        presentationTool({
            previewUrl: {
                draftMode: {
                    enable: '/api/draft',
                },
            },
        }),
        unsplashImageAsset(),
        vercelDeployTool(),
        youtubeInput({ apiKey: googleApiKey }),
    ].filter(Boolean) as PluginOptions[],
    previewUrl: {
        previewMode: {
            enable: '/api/draft-mode/enable',
        },
    },
    projectId,
    // Add and edit the content schema in the './sanity/schema' folder
    schema,
});

@webbeandk
Copy link

I have this issue as well.

Did you fix this?

@ndimatteo
Copy link
Owner

Thanks for sharing more info @tim-soft!

  1. Vercel versions their API, so there shouldn't be any issues with that aspect of the plugin using the Vercel API
  2. Aside from storing the deployment fields in a Sanity document, Sanity has little to do with how this plugin functions

I've tested on a few production studios (using Sanity v3.64 and v3.65 alongside the latest version of the plugin) and I'm not seeing any issues with deployment entries showing up and functioning properly.

I'd double-check your Vercel Token to ensure it has proper access to the project, and whether it's part of a vercel team.

@michaelburtonray
Copy link

michaelburtonray commented Dec 4, 2024

Same, the deploy buttons disappeared for me and I haven't changed any settings, just upgraded packages.

sanity: 3.65.1
react: 18.3.1
sanity-plugin-vercel-deploy: 3.3.4

I'm getting two error messages in the javascript console:

WebSocket connection to 'wss://ktd8sgy8.api.sanity.io/v2022-06-30/socket/production?tag=sanity.studio' failed: WebSocket is closed before the connection is established.

useColorScheme() is deprecated, use useColorSchemeValue() or useColorSchemeSetValue() instead Error Component Stack

@ndimatteo
Copy link
Owner

ndimatteo commented Dec 4, 2024

@michaelburtonray you should be on version 3.3.4 of this plugin, that is the latest (not sure where you got 10.9.1 from).

I'm testing on the same versions of React (18.3.1) and Sanity (3.65.1) and not seeing any errors, even with the useColorScheme deprecated warning (which shouldn't cause any performance issues).

@tim-soft
Copy link
Author

tim-soft commented Dec 9, 2024

I also had a working project that stopped out of the blue, I don't see any errors in chrome devtools

@sellsteam13
Copy link

I had a similar issue, and updating the "sanity" package to version 3.66.1 helped me.

@jonah-day
Copy link

I'm having a simlar issue as well with the deploy button missing. Everything was working fine until I upgraded other dependencies (I was already using 3.3.4 for this)

@jonah-day
Copy link

Ah yeah so React seemed to be the issue for me- I downgraded to React (18.3.1) and it's now working again for me, even with the latest version of Sanity (3.67.1). Hope this helps!

@johannesmutter
Copy link

Same issue here. Downgrading React helped me too.

@davidatqala
Copy link

I am still unable to get it to work, even after the downgrade to react 18.3.1. It just shows the webhook and Im not able to edit, delete or remove them now.

@wdtamagi
Copy link

Yeah, same thing here with React 19. The problem is that I'm using NextJs 15 and it requires this version.

@alaxvong
Copy link

alaxvong commented Jan 28, 2025

I'm part of the group that encountered button rendering issues after upgrading our site to React 19/Next 15. We were able to resolve it by installing/upgrading react-is to version 19.0.0. I’m not sure what the root problem is, but maybe someone else can help drill down further. In the meantime, this fix has restored functionality for our client.

@davidatqala
Copy link

I'm part of the group that encountered button rendering issues after upgrading our site to React 19/Next 15. We were able to resolve it by installing/upgrading react-is to version 19.0.0. I’m not sure what the root problem is, but maybe someone else can help drill down further. In the meantime, this fix has restored functionality for our client.

this worked! thank you!

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

No branches or pull requests

10 participants