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: Incorrect error when applying local migrations with d1 "Cannot read properties of undefined (reading 'map')" #2431

Closed
seveibar opened this issue Dec 18, 2022 · 5 comments
Labels
bug Something that isn't working d1 Relating to D1 miniflare Relating to Miniflare

Comments

@seveibar
Copy link

seveibar commented Dec 18, 2022

What version of Wrangler are you using?

2.6.2

What operating system are you using?

Linux

Describe the Bug

When the migration fails, I get the error Cannot read properties of undefined (reading 'map') when trying to do wrangler d1 migrations apply my_db_name --local

After fixing the issue with the migration, there is no error.

image

When you migrate without --local, you get the proper error:

image

@seveibar seveibar added the bug Something that isn't working label Dec 18, 2022
@workers-devprod workers-devprod moved this to Untriaged in workers-sdk Dec 18, 2022
@seveibar seveibar changed the title 🐛 BUG: Can't apply local migrations Cannot read properties of undefined (reading 'map') 🐛 BUG: Can't apply local migrations with d1 "Cannot read properties of undefined (reading 'map')" Dec 18, 2022
@seveibar seveibar changed the title 🐛 BUG: Can't apply local migrations with d1 "Cannot read properties of undefined (reading 'map')" 🐛 BUG: Incorrect error when applying local migrations with d1 "Cannot read properties of undefined (reading 'map')" Dec 18, 2022
@admah admah added the d1 Relating to D1 label Dec 21, 2022
@admah admah moved this from Untriaged to Backlog in workers-sdk Dec 21, 2022
@admah
Copy link
Contributor

admah commented Dec 21, 2022

Thanks for reporting this. We will take a look at it.

cc: @rozenmd

@rozenmd
Copy link
Contributor

rozenmd commented Jan 23, 2023

This might be fixed with the latest version of the shim in miniflare (CC @mrbbot)

@rozenmd rozenmd added the miniflare Relating to Miniflare label Jan 23, 2023
@mrbbot
Copy link
Contributor

mrbbot commented Jan 23, 2023

Hey! 👋 Yep, I'm in the process of revamping the D1 Miniflare integration to use the shim. This should help alleviate some of these issues once implemented.

@mrbbot
Copy link
Contributor

mrbbot commented Feb 14, 2023

Hmmm, looks like this isn't quite fixed by #2717, this is the output I'm getting now:
image
I guess we'll need to extract the cause if the error has one.

@mrbbot
Copy link
Contributor

mrbbot commented Mar 20, 2023

Hey! 👋 This should've be fixed by #2838 👍

@mrbbot mrbbot closed this as completed Mar 20, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in workers-sdk Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working d1 Relating to D1 miniflare Relating to Miniflare
Projects
None yet
Development

No branches or pull requests

4 participants