vantezzen / wrapped

📊 Personalized stats about your time on TikTok.
https://wrapped.vantezzen.io
74 stars 11 forks source link

Stuck on loading #1

Open sharktie opened 1 year ago

sharktie commented 1 year ago

Just wanted to let you know that both the code i tried to compile and ur website both get stuck trying to read the data file.

LMK if theres a fix. TY :)

Hider-alt commented 1 year ago

Hi, I had the same problem as you. I found that what was causing the error was that in the user_data.json file, in the ShareHistoryList, there were shared tiktoks that had in the "Method" field "whatsapp" or "whatsapp_status". I solved it for now by deleting them from the file and now it works.

sharktie commented 1 year ago

Hi, I had the same problem as you. I found that what was causing the error was that in the user_data.json file, in the ShareHistoryList, there were shared tiktoks that had in the "Method" field "whatsapp" or "whatsapp_status". I solved it for now by deleting them from the file and now it works.

Hey i've checked the entire file and Whatsapp doesn't exist on it so idk what else could be messing with it

chriszal commented 1 year ago

Same i get this errror when entering the json file

` Uncaught ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "Activity", "Favorite Effects", "FavoriteEffectsList", 0, "Link" ], "message": "Required" },

message": "Invalid enum value. Expected 'copy' | 'share' | 'save' | 'more' | 'chat_head', received 'chat'" } ] at get error [as error] (473-41d274466d569b41.js:6:37821) at V.parse (473-41d274466d569b41.js:6:39876) at r.onload (page-30c6ad3d7eb26f5a.js:1:14068) g

`

Hider-alt commented 1 year ago

Then try doing as I did. I downloaded the zip from this commit (three days old, because the newer ones were giving me errors when I ran them), then in cmd I typed npm install and then npm run dev, then I went to localhost:3000 and loaded the user_data.json file. After that I clicked on the "1 error" div and that had appeared in the bottom left corner and from there I saw that the error was due to the value of "Method" in the json file. Try to see if it gives you any error too, and if you want to post it here

Hi, I had the same problem as you. I found that what was causing the error was that in the user_data.json file, in the ShareHistoryList, there were shared tiktoks that had in the "Method" field "whatsapp" or "whatsapp_status". I solved it for now by deleting them from the file and now it works.

Hey i've checked the entire file and Whatsapp doesn't exist on it so idk what else could be messing with it

Hider-alt commented 1 year ago

Same i get this errror when entering the json file

` Uncaught ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "Activity", "Favorite Effects", "FavoriteEffectsList", 0, "Link" ], "message": "Required" },

message": "Invalid enum value. Expected 'copy' | 'share' | 'save' | 'more' | 'chat_head', received 'chat'" } ] at get error [as error] (473-41d274466d569b41.js:6:37821) at V.parse (473-41d274466d569b41.js:6:39876) at r.onload (page-30c6ad3d7eb26f5a.js:1:14068) g

`

Seems that you have my error too, but with "chat" instead of "whatsapp". If there aren't too many TikTok with this share method you could try deleting them from the file

xrcher commented 1 year ago

Having the exact same issue. I had the same runtime error as chriszal and managed to get rid of the "chat" error and get rid of it successfully, but im still receiving this error:

ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "Activity", "Favorite Effects", "FavoriteEffectsList", 0, "Link" ], "message": "Required" },

The records in the json file for the specified "FavoriteEffects" section are as follows:

{ "Date": "2023-02-22 20:42:54", "EffectLink": "(TikTok Share Link)" },

Does anyone know what they are missing/not missing?

sharktie commented 1 year ago

Then try doing as I did. I downloaded the zip from this commit (three days old, because the newer ones were giving me errors when I ran them), then in cmd I typed npm install and then npm run dev, then I went to localhost:3000 and loaded the user_data.json file. After that I clicked on the "1 error" div and that had appeared in the bottom left corner and from there I saw that the error was due to the value of "Method" in the json file. Try to see if it gives you any error too, and if you want to post it here

Yup this fixed it. I had 4 errors on the new build and only 1 on this one mentioned by the person above. The error was fixed by removing the files that it said in the error code from the Sharehistorylist. I had 4 shares that werent getting red properly and a quick find and delete was able to solve the issue. If anyone else is struggling with the same issue try as stated here and all should work.

xrcher commented 1 year ago

Having the exact same issue. I had the same runtime error as chriszal and managed to get rid of the "chat" error and get rid of it successfully, but im still receiving this error:

ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "Activity", "Favorite Effects", "FavoriteEffectsList", 0, "Link" ], "message": "Required" },

The records in the json file for the specified "FavoriteEffects" section are as follows:

{ "Date": "2023-02-22 20:42:54", "EffectLink": "(TikTok Share Link)" },

Does anyone know what they are missing/not missing?

Update:

Same i get this errror when entering the json file

` Uncaught ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "Activity", "Favorite Effects", "FavoriteEffectsList", 0, "Link" ], "message": "Required" },

message": "Invalid enum value. Expected 'copy' | 'share' | 'save' | 'more' | 'chat_head', received 'chat'" } ] at get error [as error] (473-41d274466d569b41.js:6:37821) at V.parse (473-41d274466d569b41.js:6:39876) at r.onload (page-30c6ad3d7eb26f5a.js:1:14068) g

`

Figured it out. Change the text for all your FavoriteEffects "EffectsLink" to just "Link".

{ "Activity": { "Favorite Effects": { "FavoriteEffectsList": [ { "Date": "2023-03-06 20:07:10", "Link": "https://m.tiktok.com/share/stickers/detail/15312364.html"

I found it easier to just delete all the records and only keep 1 placeholder one as I do not care about the effects stats on my wrapped:

{ "Activity": { "Favorite Effects": { "FavoriteEffectsList": [ { "Date": "2023-03-06 20:07:10", "Link": "https://m.tiktok.com/share/stickers/detail/15312364.html" } ] }, Followed by FavoriteHastags etc

TikTok must've updated their JSON output so that FavoriteEffects link is defined by EffectsLink, and the wrapped site wasnt expecting it.

chriszal commented 1 year ago

made all the changes above and now im getting: Uncaught ZodError: [ { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "Activity", "Most Recent Location Data" ], "message": "Required" } ] at get error [as error] (473-41d274466d569b41.js:6:37821) at V.parse (473-41d274466d569b41.js:6:39876) at r.onload (page-30c6ad3d7eb26f5a.js:1:14068) g

xrcher commented 1 year ago

made all the changes above and now im getting: Uncaught ZodError: [ { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "Activity", "Most Recent Location Data" ], "message": "Required" } ] at get error [as error] (473-41d274466d569b41.js:6:37821) at V.parse (473-41d274466d569b41.js:6:39876) at r.onload (page-30c6ad3d7eb26f5a.js:1:14068) g

I don't get an error under "Most Recent Location Data" replace the section with mine:

"Most Recent Location Data": {
  "LocationData": {
    "Date": "N/A",
    "GpsData": "N/A",
    "LastRegion": "N/A"
  }
},

Make sure you are also using the 3 days old commit that hider alt tagged: https://github.com/vantezzen/wrapped/tree/7751012e89c952d35483e05d221fb7eaebe85e01

vantezzen commented 1 year ago

Thanks for reporting this, looks like the zod validations are not loose enough. I now temporarily removed all zod validation and simply use the TikTok JSON object as-is (https://github.com/vantezzen/wrapped/commit/de35ed1d7ce6a2bee65efee65134c206e3f61666) which is now deployed (though it might need a few minutes to update the caches).

For those running https://github.com/vantezzen/wrapped/tree/7751012e89c952d35483e05d221fb7eaebe85e01 because newer commits gave you errors - could you post what errors you get there?

xrcher commented 1 year ago

For those running https://github.com/vantezzen/wrapped/tree/7751012e89c952d35483e05d221fb7eaebe85e01 because newer commits gave you errors - could you post what errors you get there?

npm install works fine, however I am unable to compile with npm run dev on the latest commit, console and localhost page show this error:

C:UsersarcheDownloadswrapped-mainsentry.server.config.ts Module build failed: UnhandledSchemeError: Reading from "C:UsersarcheDownloadswrapped-mainsentry.server.config.ts" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "c:" URIs.

Below is PS console: image

Hope you can get to the bottom of this!

vantezzen commented 1 year ago

It looks like this is caused by https://github.com/getsentry/sentry-javascript/pull/8142 where the fix for Nextjs was published 3 hours ago (https://www.npmjs.com/package/@sentry/nextjs?activeTab=versions). I now upgraded Sentry with https://github.com/vantezzen/wrapped/commit/893e3b482a2b781e249b28290f052722f6274b3f which should hopefully allow running on Windows after running npm i again