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

TypeError: Cannot read properties of null (reading 'nextPageId') #50

Open
or1n opened this issue Jan 26, 2025 · 2 comments
Open

TypeError: Cannot read properties of null (reading 'nextPageId') #50

or1n opened this issue Jan 26, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@or1n
Copy link

or1n commented Jan 26, 2025

Description:
I encountered an issue while using the Google Photos Toolkit userscript. When attempting to perform the "Move to Trash" action on the "Library" tab, the process fails, and an error is logged in the console. This prevents the script from functioning as expected.

Environment:

  • Extension: Violentmonkey BETA 2.29.1
  • Browser: Google Chrome (Version 132.0.6834.111, Official Build, 64-bit)
  • URL: https://photos.google.com/

Steps to Reproduce:

  1. Open Google Photos and ensure the userscript is active.
  2. Click the "GPTK" button to open the toolkit.
  3. Navigate to the "Library" tab and select the "Move to Trash" action.
  4. A pop-up appears with the following message:
photos.google.com says
Account: [email protected]
Source: Library
Filter: None
Action: Move To Trash
Proceed?
  1. Click "Okay" in the pop-up.

Observed Behavior:

  • The following error appears in the browser console:
Start Time 19:01:27
Reading library
Found 500 items
Found 494 items
TypeError: Cannot read properties of null (reading 'nextPageId')
  • No items were deleted despite the action being initiated.

Expected Behavior:

  • The script should successfully delete items from the Library tab as specified by the action.

Additional Notes:

  • The issue seems to occur during the process of reading the library or paging through the items.
  • Please let me know if further details or logs are needed to assist with debugging.

Thank you for your help in resolving this issue!

@xob0t
Copy link
Owner

xob0t commented Jan 28, 2025

Hi!
I cannot replicate it.
This is likely a GP's api bug, if it does not return nextPageId there is not much I can do about it.
If someone has this issue and can debug it, please post your findings or send a PR.

@xob0t xob0t marked this as a duplicate of #46 Jan 28, 2025
@xob0t xob0t marked this as a duplicate of #43 Jan 28, 2025
@poornachandratejasvi
Copy link

this is how i found the issue

Delete all the photos/videos from the account using the Move to Trash option using the GPTK tool, and clean/empty the bin.
add new set of photos; the error will be reproduced

@xob0t xob0t added the bug Something isn't working label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants