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

🐛 Bug Report: Attribute creation timed out. #160

Open
2 tasks done
pingu2k4 opened this issue Jan 16, 2025 · 2 comments
Open
2 tasks done

🐛 Bug Report: Attribute creation timed out. #160

pingu2k4 opened this issue Jan 16, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pingu2k4
Copy link

👟 Reproduction steps

Running appwrite push collections

I synced from one project, and attempted to push to a new one. I test on one of them, make my changes within appwrite, and then deploy by pushing the same changes to a different project Id. It failed half way through though.

👍 Expected behavior

not crash

👎 Actual Behavior

CLI Error:

Error: Attribute creation timed out.
    at createAttributes (C:\Users\pingu\AppData\Roaming\npm\node_modules\appwrite-cli\lib\commands\push.js:889:15)
    at async pushCollection (C:\Users\pingu\AppData\Roaming\npm\node_modules\appwrite-cli\lib\commands\push.js:1425:13)

The very first time this ran, I had the following output in my github actions:

ℹ Info: Checking for changes ...
ℹ Info: Collection PollOptions does not exist in the project. Creating ... 
ℹ Info: Collection PollSuggestions does not exist in the project. Creating ... 
ℹ Info: Collection PollVotes does not exist in the project. Creating ... 
ℹ Info: Collection Polls does not exist in the project. Creating ... 
ℹ Info: Pushing collection Polls ( 676a27c20025b8a268[9](https://github.com/PinguApps/Wrevo/actions/runs/12801367610/job/35690743093#step:6:10)b - 677d650400147922cdf8 ) attributes
ℹ Info: For detailed error pass the --verbose or --report flag
✗ Error: Attribute creation timed out.
Error: Process completed with exit code 1.

And then running it a second time produced the following:

ℹ Info: Checking for changes ...
ℹ Info: List of applied changes
                                                                                                   
  Key                                         │ Action │ Reason                                    
 ─────────────────────────────────────────────┼────────┼────────────────────────────────────────── 
  PollOptions in Polls (677d650400147[9](https://github.com/PinguApps/Wrevo/actions/runs/12801367610/job/35690871244#step:6:10)22cdf8) │ adding │ Field isn't present on the remote server  
                                                                                                   
ℹ Info: List of applied changes
                                                                                                           
  Key                                                 │ Action │ Reason                                    
 ─────────────────────────────────────────────────────┼────────┼────────────────────────────────────────── 
  i_StartTime in Polls (677d650400[14](https://github.com/PinguApps/Wrevo/actions/runs/12801367610/job/35690871244#step:6:15)7922cdf8)         │ adding │ Field isn't present on the remote server  
 ─────────────────────────────────────────────────────┼────────┼────────────────────────────────────────── 
  i_EndTime in Polls (677d650400147922cdf8)           │ adding │ Field isn't present on the remote server  
 ─────────────────────────────────────────────────────┼────────┼────────────────────────────────────────── 
  i_StartTime_EndTime in Polls (677d650400147922cdf8) │ adding │ Field isn't present on the remote server  
                                                                                                           
ℹ Info: Pushing collection Polls ( 676a27c[20](https://github.com/PinguApps/Wrevo/actions/runs/12801367610/job/35690871244#step:6:21)025b8a2689b - 677d650400147922cdf8 ) attributes
ℹ Info: For detailed error pass the --verbose or --report flag
✗ Error: Attribute creation timed out.
Error: Process completed with exit code 1.

I am running on a linux github host, but have also just run with --verbose --report on my windows machine and this was the output:

ℹ Info: Checking for changes ...
ℹ Info: List of applied changes

  Key                                         │ Action │ Reason
 ─────────────────────────────────────────────┼────────┼──────────────────────────────────────────
  PollOptions in Polls (677d650400147922cdf8) │ adding │ Field isn't present on the remote server

ℹ Info: List of applied changes

  Key                                                 │ Action │ Reason
 ─────────────────────────────────────────────────────┼────────┼──────────────────────────────────────────
  i_StartTime in Polls (677d650400147922cdf8)         │ adding │ Field isn't present on the remote server
 ─────────────────────────────────────────────────────┼────────┼──────────────────────────────────────────
  i_EndTime in Polls (677d650400147922cdf8)           │ adding │ Field isn't present on the remote server
 ─────────────────────────────────────────────────────┼────────┼──────────────────────────────────────────
  i_StartTime_EndTime in Polls (677d650400147922cdf8) │ adding │ Field isn't present on the remote server

ℹ Info: Pushing collection Polls ( 676a27c20025b8a2689b - 677d650400147922cdf8 ) attributes
ℹ Info: To report this error you can:
 - Create a support ticket in our Discord server https://appwrite.io/discord
 - Create an issue in our Github
   https://github.com/appwrite/appwrite/issues/new?labels=bug&template=bug.yaml&title=%F0%9F%90%9B+Bug+Report%3A+Attribute+creation+timed+out.&actual-behavior=CLI+Error%3A%0A%60%60%60%0AError%3A+Attribute+creation+timed+out.%0A++++at+createAttributes+%28C%3A%5CUsers%5Cpingu%5CAppData%5CRoaming%5Cnpm%5Cnode_modules%5Cappwrite-cli%5Clib%5Ccommands%5Cpush.js%3A889%3A15%29%0A++++at+async+pushCollection+%28C%3A%5CUsers%5Cpingu%5CAppData%5CRoaming%5Cnpm%5Cnode_modules%5Cappwrite-cli%5Clib%5Ccommands%5Cpush.js%3A1425%3A13%29%0A%60%60%60&steps-to-reproduce=Running+%60appwrite+push+collections%60&environment=CLI+version%3A+6.1.0%0AOperation+System%3A+Windows_NT%0AAppwrite+version%3A+1.6.1%0AIs+Cloud%3A+Yes

✗ Error:
 Stack Trace:

Error: Attribute creation timed out.
    at createAttributes (C:\Users\pingu\AppData\Roaming\npm\node_modules\appwrite-cli\lib\commands\push.js:889:15)
    at async pushCollection (C:\Users\pingu\AppData\Roaming\npm\node_modules\appwrite-cli\lib\commands\push.js:1425:13)

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Windows

🧱 Your Environment

CLI version: 6.1.0
Operation System: Windows_NT
Appwrite version: 1.6.1
Is Cloud: Yes

👀 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?

@pingu2k4 pingu2k4 added the bug Something isn't working label Jan 16, 2025
@stnguyen90 stnguyen90 transferred this issue from appwrite/appwrite Mar 1, 2025
@stnguyen90
Copy link
Contributor

@pingu2k4 thanks for raising this issue! 🙏🏼 It does look like there are a couple issues with the CLI:

First, some of the API calls to create attributes are not awaited so the create can silently fail. For example:

return databasesCreateRelationshipAttribute({

Second, the CLI waits for all attributes to exist:

const result = await awaitPools.expectAttributes(
collection['databaseId'],
collection['$id'],
collection.attributes.map(attribute => attribute.key)
);

but child side relationships won't be created

if (attribute.side !== 'child') {
await createAttribute(collection['databaseId'], collection['$id'], attribute);
}

For the second issue, I modified:

collection.attributes.map(attribute => attribute.key)

to

collection.attributes.filter(attribute => attribute.side !== 'child').map(attribute => attribute.key)

to fix the issue. I'll escalate this internally to see if we can get this fixed.

@pingu2k4
Copy link
Author

pingu2k4 commented Mar 4, 2025

Thank you so much for this. :)

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