Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Error message is unhelpful when multiple KV stores are bound to the same variable #2020

Closed
ishanjain28 opened this issue Aug 6, 2021 · 6 comments
Labels
bug Something isn't working timed out

Comments

@ishanjain28
Copy link

🐛 Bug report

Describe the bug

It's failing to deploy new version of worker. It fails to deploy even if I revert to the old version of worker and try to deploy that.

emerald :: work/project » wrangler publish
✨  Built successfully, built project size is 2 KiB.
Error: Something went wrong with the request to Cloudflare...
workers.api.error.unknown [API code: 10013]

Reproduce the bug

I do not have a good way to reproduce this. It started happening in this worker few weeks back and now I just can not update it from wrangler. I can update other workers just fine.

Expected behavior

It should update the code.

Environment and versions

Fill out the following information about your environment.

  • operating system: Linux emerald 5.13.4-arch1-1 #1 SMP PREEMPT Tue, 20 Jul 2021 16:58:51 +0000 x86_64 GNU/Linux
  • output of wrangler -V: wrangler 1.19.0(I can also replicate it on wrangler 1.17, 1.18)
  • output of node -v: v14.17.3
  • content of wrangler.toml:
Contents of wrangler.toml(Some stuff has been redacted since I don't know if it's safe to share that information.
name = "static_instadapp_io"
type = "webpack"

account_id = ""
workers_dev = false
route = "https://static.instadapp.io/*"
zone_id = ""
target_type = "javascript"

kv_namespaces = [
    { binding = "COMPOUND", id = "ad7d8f1f691945d9bfcd027687ad1e24", preview_id = "ad7d8f1f691945d9bfcd027687ad1e24" },
    { binding = "COMPOUND_12580000", id = "96868ba7775d4c279b72659140c78595", preview_id = "96868ba7775d4c279b72659140c78595" },
    { binding = "COMPOUND_12644000", id = "1d70a277f1254518a8b4b0566b6bfad0", preview_id = "1d70a277f1254518a8b4b0566b6bfad0" },

    { binding = "MAKERDAO", id = "84dc91cd29c54260b4b901216221d235", preview_id = "84dc91cd29c54260b4b901216221d235" },
    { binding = "MAKERDAO_12580000", id = "93fafa7c5c894ec6b590f021e00dfd8a", preview_id = "93fafa7c5c894ec6b590f021e00dfd8a" },
    { binding = "MAKERDAO_12644000", id = "3bb972b232de4e4682f957c3681a946b", preview_id = "3bb972b232de4e4682f957c3681a946b" },

    { binding = "AAVE_V2", id = "67954f8517494e76a23d00460ed1520e", preview_id = "67954f8517494e76a23d00460ed1520e" },
    { binding = "AAVE_V2_12580000", id = "93cc4cb531304876ba61e7048626cc75", preview_id = "93cc4cb531304876ba61e7048626cc75" },
    { binding = "AAVE_V2_12644000", id = "22852f45ff5b41a8bc12f98702cb723a", preview_id = "22852f45ff5b41a8bc12f98702cb723a" },
    { binding = "AAVE_V2_15773000_POLYGON", id = "70c4b83564834dfea7a9450184d95ec3", preview_id = "70c4b83564834dfea7a9450184d95ec3" },

    { binding = "MERKLE_PROOFS_LM1", id = "5fdd7d9798ef45c5a00de1ae0863505f", preview_id = "5fdd7d9798ef45c5a00de1ae0863505f" },
    { binding = "MERKLE_PROOFS_LM2", id = "b71d2a11f3f74879a6c142211d496c63", preview_id = "b71d2a11f3f74879a6c142211d496c63" },
    { binding = "MERKLE_PROOFS_LM3", id = "f7190f904f4e40caa9b1d346b80d0d2c", preview_id = "f7190f904f4e40caa9b1d346b80d0d2c" },
    { binding = "MERKLE_PROOFS_LM4", id = "a29bc6640b3c4af3b3ddc09e15838d5f", preview_id = "a29bc6640b3c4af3b3ddc09e15838d5f" },
    { binding = "MERKLE_PROOFS_LM4", id = "de07a0825aff4a8d9dabfb548141f29f", preview_id = "de07a0825aff4a8d9dabfb548141f29f" },
    { binding = "MERKLE_PROOFS_LM6", id = "58160c07f861470db3c4feffb7e8691d", preview_id = "58160c07f861470db3c4feffb7e8691d" },
    { binding = "MERKLE_PROOFS_LM7", id = "af067ecc0e3947bd96d604c26efd4d78", preview_id = "af067ecc0e3947bd96d604c26efd4d78" },

    { binding = "USER_CLAIMS", id = "90348a3017fe4c1bb29634eb8caebd1a", preview_id = "90348a3017fe4c1bb29634eb8caebd1a" },
    { binding = "USER_CLAIMS_LM1", id = "ab7fcb15f3ff40e4b589a481040ca262", preview_id = "ab7fcb15f3ff40e4b589a481040ca262" },
    { binding = "USER_CLAIMS_LM2", id = "28e46d72780442b5b67a5705191ca8ad", preview_id = "28e46d72780442b5b67a5705191ca8ad" },
    { binding = "USER_CLAIMS_LM3", id = "9fc367aba57c47d5bb1c167864b1196f", preview_id = "9fc367aba57c47d5bb1c167864b1196f" },
    { binding = "USER_CLAIMS_LM4", id = "f1923d2382704b7aa83aeb72dc5a3391", preview_id = "f1923d2382704b7aa83aeb72dc5a3391" },
    { binding = "USER_CLAIMS_LM5", id = "b98cafa8cbd04e249eada0e438c94e19", preview_id = "b98cafa8cbd04e249eada0e438c94e19" },
    { binding = "USER_CLAIMS_LM6", id = "d1bd366cec254459a84cd4edf60a840c", preview_id = "d1bd366cec254459a84cd4edf60a840c" },
    { binding = "USER_CLAIMS_LM7", id = "a0d6658cc7ad4a03bac3593487f929e1", preview_id = "a0d6658cc7ad4a03bac3593487f929e1" },
]

Please note that running wrangler build, pasting ~/dist/worker.js in workers code editor on cloudflare and then updating it still works fine.

I also saw 4-5 similar issues and they were supposedly fixed but I still have this problem. (#1415 as an example)

@ishanjain28 ishanjain28 added the bug Something isn't working label Aug 6, 2021
@jyn514
Copy link
Contributor

jyn514 commented Aug 9, 2021

@ishanjain28 if you fill in the account_id field, does it work again? If so this is probably a regression from #1966.

@ishanjain28
Copy link
Author

@jyn514 The configuration had account_id and zone_id fields filled in. I removed these fields before uploading the configuration here.

@ishanjain28
Copy link
Author

I believe there is something wrong with the KV integration.
If I disable all KV bindings, It deploys just fine.

@ishanjain28
Copy link
Author

The issue was in my config.

{ binding = "MERKLE_PROOFS_LM4", id = "a29bc6640b3c4af3b3ddc09e15838d5f", preview_id = "a29bc6640b3c4af3b3ddc09e15838d5f" },
{ binding = "MERKLE_PROOFS_LM4", id = "de07a0825aff4a8d9dabfb548141f29f", preview_id = "de07a0825aff4a8d9dabfb548141f29f" },

Two KV store are being bound to a single variable.

Since, It appears this is not allowed, I believe there is room to improve the error message here.

I'll wait for someone else to weigh in on this and close the issue in a week or so. Thank you for your time.

@jyn514 jyn514 changed the title Errors in publishing new version of worker. Error message is unhelpful when multiple KV stores are bound to the same variable Aug 13, 2021
@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.

@stale stale bot added the timed out label Mar 2, 2022
@JacobMGEvans
Copy link
Contributor

Thanks for creating this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this PR.

New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it or create a new PR in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working timed out
Projects
None yet
Development

No branches or pull requests

3 participants