Closed reykjalin closed 2 years ago
Looking through the changelog, maybe defaulting the UUID encoding to a string is what's behind the issue? I saw this in the changelog:
- UUID encoding for both :binary_id and :uuid/Ecto.UUID is now configurable
- :uuid/Ecto.UUID is now encoded as a string by default
How would I go about changing the encoding to what it was in 0.5 after I update to 0.7?
I'll take a look at this, but I think this does not have any bearing on ecto_sqlite3
but I'll dive in.
Can you provide me your mix.lock
file as well?
Of course! Thanks for taking a look!
This is the mix.lock
file that doesn't give me any issues. If I change the version of ecto_sqlite3
to 0.6 or 0.7 (e.g. ~> 0.7.0
) and run mix deps.get && mix phx.server
I start seeing the aforementioned error logs when I try to open the home page of my phoenix app — but only if I'm logged in. I think that probably has something to do with how the session is stored in the SQLite database?
The authentication system was generated with phx_gen_auth
version 0.7.0 (GitHub repo is here). I think token schema may be of help, or maybe the session token generation function.
Yea I just wanted a good known starting position before trying to upgrade packages to diagnose what is going on.
Here's the change you were referring to
https://github.com/elixir-sqlite/ecto_sqlite3/compare/v0.6.0...v0.6.1
If you set config :ecto_sqlite3, uuid_type: :string, binary_id_type: :string
you should be good. Right now it defaults to string regardless
https://github.com/elixir-sqlite/ecto_sqlite3/blob/main/lib/ecto/adapters/sqlite3.ex#L340-L354
Try fiddling with :string
and :binary
I'll try that and report back as soon as I have, thanks!
I set the config to
config :ecto_sqlite3, uuid_type: :binary, binary_id_type: :binary
and that did the trick. Thank you very much!
I'm not sure if this is the right place to report this issue, but it seems ecto_sqlite 0.6 and 0.7 don't play well with HTTPS support in cowboy? Or maybe Jason or Rancher?
I haven't been able to figure out the cause of the issue, only that it happens when I try to update my ecto_sqlite3 dependency from 0.5.5 to 0.7
I've tried to rebuild the project from scratch, including with a new lock file like so:
But I still see the error I pasted in above.
The context of the issue: I'm working on a Phoenix LiveView application and wanted to update my dependencies since it's been a while since I did that. All the updates went really smoothly with no issues, but when I try to update ecto_sqlite3 I run into this issue.
I'm running Elixir v1.13.0 on macOS Monterey:
Here is my dependency array in my
mix.exs
file:Do you have any idea how I can try to figure out what the problem is? My best guess is that something in the session stored in the DB (created via
phx.gen.auth
) is not being deserialized correctly? But I really have no clue.If you don't think this is the right place to report the issue feel free to direct me somewhere else.