Back

[SOLVED] Bug Report: Cannot deploy collections in appwrite.json with Int Attributes

  • 0
  • Databases
  • Cloud
Sonicviz
2 Jan, 2024, 15:14

Hi. I'm creating a collection via appwrite cli from appwrite.json but it's returning "✗ Error Invalid min param: Value must be a valid integer" and "✗ Error Invalid max param: Value must be a valid integer" for min/max fields that have been set to { "key": "createdAt", "type": "integer", "status": "available", "required": true, "array": false, "min": -9223372036854776000, "max": 9223372036854776000, "default": null } It's from this repo https://github.com/Meldiron/almost-cookie-store and article https://dev.to/appwrite/start-selling-online-using-appwrite-and-stripe-3l04 but the instructions and repo are deprecated, but I'm trying to get it to work as a demo to test out stripe integration, as there don't seem to be any others available.

Ok, this seems to be the same error as https://github.com/appwrite/appwrite/issues/2894 which was reported Mar 4, 2022 and still seems unfixed. Is there a solution?

I've added a comment to the github bug report as well.

TL;DR
Title: [SOLVED] Cannot deploy collections with Int Attributes in appwrite.json Issue: User encountered an error while deploying collections with integer attributes in appwrite.json. The bug was reported on GitHub but is still unresolved. Solution: Replace the min and max parameters with -9223372036854776000 and 9223372036854776000 respectively. Add a comment to the GitHub bug report for further assistance.
Kenny
2 Jan, 2024, 15:36

Should the values not be -9223372036854775808 and 9223372036854775808? As that is the max integer value?

ideclon
2 Jan, 2024, 16:05

The bug you’ve linked was about the min/max parameters being generated incorrectly, not about these incorrect values failing deployment (which is intended behaviour). As @Kenny said, replace the min and max parameters with the numbers he gave.

Sonicviz
3 Jan, 2024, 00:27

I'll try that, thanks.

Sonicviz
3 Jan, 2024, 00:32

@ideclon Don't shoot the messenger. The bug I linked literally says "Cannot deploy collections in appwrite.json with Int Attributes" and is related to the issue, as multiple others in the bug report have the same problem. I'm just trying to get clarity on what the issue is, as Kenny clarified.

ideclon
3 Jan, 2024, 00:37

That is correct - the user who opened the Issue did indeed think that the bug was in the import process. However, as I explained above, the bug was actually in the export process - so though the bug has been fixed, it didn't help you because the export was before that.

Sonicviz
3 Jan, 2024, 00:43

The problem was resolved from my POV, so works for me. It was the closest I could find to the issue, and was pretty much the issue as I experienced it. In any event, deployment seems unreliable anyway. Tried multiple times now and it just comes back ✗ Error Attribute deletion did not finish for too long. (so deleted collection manually to retry as a test) or hangs on a 500 error. I guess it's early days for the cloud so will take some time to settle down.

Sonicviz
3 Jan, 2024, 00:49

Systems says all ok https://status.appwrite.online/ but get ✗ Error Server Error now.

Whatever I guess, it's a different issues, so please close this or delete it. Thanks.

D5
3 Jan, 2024, 10:05

Could you please create a new post here for that?

D5
3 Jan, 2024, 10:05

[SOLVED] Bug Report: Cannot deploy collections in appwrite.json with Int Attributes

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more