[SOLVED] tokenURI return undefined

So i have this project that i stop working on it months ago and intend to continue currently, and i got some errors.

I have this code

const spaceshipUri = await nftContract.methods.tokenURI(id).call({from:ethAddress});
				logger.info("uri "+spaceshipUri);
				await Moralis.Cloud.httpRequest({
					url: spaceshipUri,
				}).then(function(httpResponse) {
					logger.info(httpResponse.text);
					spaceshipData = httpResponse.data;
				}, function(httpResponse) {
					logger.error('Request failed with response code ' + httpResponse.status);
				});
logger.info("data "+spaceshipData);

this code

logger.info("uri "+spaceshipUri);

return this URI https://cv11cevjegiq.usemoralis.com:2053/server/files/jJGj0os96A7V2Wg0FUR1m43ouDEAOb2LJX5xhz0u/9acdd06e97c394c8445ddd3f7947d9a3_Destructor.json

but seems i can’t open that URI

logger.info("data "+spaceshipData);

this return undefined.

it worked before, anyone can help me what is wrong?

thanks.

that server is no longer accessible now and that is why you can not read that data any more from that token_uri

so there’s no way to retrieve that token_uri then? the data forever lost?

so when i create new NFT, did the token_uri will create in new server? or i need to change some code to save the json metadata?

usually you should upload the data to IPFS so that it doesn’t depend on a server

ok then, thanks @cryptokid