8000 🐛 Bug Report: Empty activity data in Console · Issue #5805 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🐛 Bug Report: Empty activity data in Console #5805

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

Closed
2 tasks done
yongbi1997 opened this issue Jul 12, 2023 · 11 comments · Fixed by #5853
Closed
2 tasks done

🐛 Bug Report: Empty activity data in Console #5805

yongbi1997 opened this issue Jul 12, 2023 · 11 comments · Fixed by #5853
Assignees
Labels
bug Something isn't working
Milestone

Comments

@yongbi1997
Copy link

👟 Reproduction steps

  1. Upgrade from v1.2.0 to v1.3.3
  2. Open the auth activity tab in console

image

And the activity logs of collections are missing as well.

👍 Expected behavior

show all correct activity logs

👎 Actual Behavior

no activity logs in all tabs

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

More details in discord

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@yongbi1997 yongbi1997 added the bug Something isn't working label Jul 12, 2023
@stnguyen90 stnguyen90 self-assigned this Jul 12, 2023
@stnguyen90
Copy link
Contributor

@yongbi1997, thanks for raising this issue! 🙏🏼 It seems 1.3.x added a userInternalId attribute to the internal audit collection, but we missed adding the attribute as part of the migration. That's why new audit activity fails with:

Utopia\Database\Exception\Structure: Invalid document structure: Unknown attribute: "userInternalId"

We'll have to push out another patch release and developers will need to run the migrate command again to create the attribute.

@bigraymasoom
Copy link

I am on version 1.5.5 and my and my appwrite container "appwrite-worker-audits logs shows this error
[Job] Received Job (663277a645fd05.85788975).
[Job] (663277a645fd05.85788975) failed to run.
[Job] (663277a645fd05.85788975) Invalid document structure: Missing required attribute "userInternalId"
[Error] Type: Utopia\Database\Exception\Structure
[Error] Message: Invalid document structure: Missing required attribute "userInternalId"
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php

@stnguyen90
8000 Copy link
Contributor

@bigraymasoom, you missed the 1.3.8 patch. You can try running that migration by executing:

docker compose exec appwrite migrate version=1.3.8

Make sure to backup before just in case.

@bigraymasoom
Copy link

I am currently on version 1.5.5 and its in production. After executing the command do I have to repeat the upgrade process to go to 1.5.5 or this command is safe without disturbing other components? Thanks

@stnguyen90
Copy link
Contributor

@bigraymasoom, it would be best to test in a duplicate environment first. Yes, it would be good to run the 1.5.5 migration again after.

@bigraymasoom
Copy link

Thanks for help, do I have to run the migration again like from 1.3.8 to 1.3.9 up to 1.5.5 or just to 1.5.5 after 1.3.8. Thanks

@bigraymasoom
Copy link

Output of above command for 1.3.8

@bigraymasoom, you missed the 1.3.8 patch. You can try running that migration by executing:

docker compose exec appwrite migrate version=1.3.8

Make sure to backup before just in case.

Output

sudo docker compose exec appwrite migrate version=1.3.8
Starting Data Migration to version 1.3.8
Migrating Project: Appwrite (console)
Migrating Databases
0 / 0
Migrating Collections

Warning: Undefined array key "$id" in /usr/src/code/src/Appwrite/Migration/Version/V18.php on line 85
Migrating Collection ""
Failed to update project ("console") version with error: Cannot access offset of type string on string

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/src/code/src/Appwrite/Migration/Version/V18.php:90
Stack trace:
#0 /usr/src/code/src/Appwrite/Migration/Version/V18.php(36): Appwrite\Migration\Version\V18->migrateCollections()
#1 /usr/src/code/src/Appwrite/Platform/Tasks/Migrate.php(99): Appwrite\Migration\Version\V18->execute()
#2 /usr/src/code/src/Appwrite/Platform/Tasks/Migrate.php(34): Appwrite\Platform\Tasks\Migrate->action('1.3.8', Object(Utopia\Cache\Cache), Object(Utopia\Database\Database), Object(Closure), Object(Utopia\Registry\Registry))
#3 /usr/src/code/vendor/utopia-php/cli/src/CLI/CLI.php(320): Appwrite\Platform\Tasks\Migrate->Appwrite\Platform\Tasks\{closure}('1.3.8', Object(Utopia\Cache\Cache), Object(Utopia\Database\Database), Object(Closure), Object(Utopia\Registry\Registry))
#4 /usr/src/code/app/cli.php(191): Utopia\CLI\CLI->run()
#5 {main}
  thrown in /usr/src/code/src/Appwrite/Migration/Version/V18.php on line 90

@stnguyen90
Copy link
Contributor

1.3.8 and then 1.5.5. Looks like you'll need to downgrade to 1.3.8 to run the migrate command.

@bigraymasoom
Copy link

Can you please refer me to the docs for downgrade (how to downgrade?). And after downgrading, do i have to upgrade to immediately higher versions till reaching 1.5.5 or directly to the 1.5.5 after 1.3.8. Thanks

@stnguyen90
Copy link
Contributor

@bigraymasoom, see https://appwrite.io/docs/advanced/self-hosting/update. For 1.3.8, instead of the "upgrade" entrypoint, use "install". Run the migrate command and then upgrade to 1.5.5.

@bigraymasoom
Copy link

Thanks, btw everything is working fine except activity tab in console. I doest not log the activity. So, after searching the discord we thought it could be the problem after checking appwrite-worker-audits logs.

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

Successfully merging a pull request may close this issue.

3 participants
0