{uuid: ‘undefined’, info: ‘task not found’}
There seems to be some problem with GET request. Whenever i try to fetch data for a uuid in my next.js web application it shows that above api structure Please fix it.
But this doesn’t arise when i am using Postman
הצטרף לדיון - הוסף תגובה למטה:
Hey, we’ve tested your code in Next.js and it’s working as expected (see screenshot: https://im.gurl.eu.org/file/834b7b0f2843ec70da872.png).
If you’re still having issues, try these debug steps:
Ensure your API key is still valid (Basic plan has usage limits). You can test it using Postman to see if it’s working.
Try loading a GIF image first to see if you get a response, then add the video tag (video can be a bit more complex).
//This is main page where i make the post request//
"use client"
import React, { useState } from ‘react’;
import { useRouter } from ‘next/navigation’;
const MainHome = () => {
const router = useRouter();
const [text_prompt, setText] = useState(’’);
const [width, setWidth] = useState(1344);
const [height, setHeight] = useState(768);
const [motion, setMotion] = useState(5);
const [seed, setSeed] = useState(0);
const [upscale, setUpscale] = useState(true);
const [interpolate, setInterpolate] = useState(true);
const [id, setId] = useState(’’);
}
export default MainHome;
// This is the generate/[id] page where i do the GET request//
"use client"
import React, { useEffect, useState } from ‘react’;
const Generate = (params) => {
};
export default Generate;
Could you send us your Next.js code? We can take a look and help troubleshoot. Feel free to DM us or post it in the thread.