How to solve "(Jason.DecodeError)" in Ash Authentication Phoenix tutorial
Hi everyone, I am going through the Ash Authentication Tutorial but I'm stuck on an obtuse error that gives me few clues where to debug it:
### my command$ mix ash_postgres.generate_migrations --name add_user_and_token### error outputExtension Migrations: No extensions to installGenerating Tenant Migrations: Generating Migrations:** (Jason.DecodeError) unexpected byte at position 0: 0x60 ("`") (jason 1.4.0) lib/jason.ex:92: Jason.decode!/2 (ash_postgres 1.3.16) lib/migration_generator/migration_generator.ex:2333: AshPostgres.MigrationGenerator.load_snapshot/1 (ash_postgres 1.3.16) lib/migration_generator/migration_generator.ex:433: anonymous fn/3 in AshPostgres.MigrationGenerator.deduplicate_snapshots/3 (elixir 1.14.1) lib/enum.ex:1662: anonymous fn/3 in Enum.map/2 (stdlib 4.1.1) maps.erl:411: :maps.fold_1/3 (elixir 1.14.1) lib/enum.ex:2480: Enum.map/2 (ash_postgres 1.3.16) lib/migration_generator/migration_generator.ex:294: anonymous fn/3 in AshPostgres.MigrationGenerator.create_migrations/3 (elixir 1.14.1) lib/enum.ex:980: anonymous fn/3 in Enum.each/2
### my command$ mix ash_postgres.generate_migrations --name add_user_and_token### error outputExtension Migrations: No extensions to installGenerating Tenant Migrations: Generating Migrations:** (Jason.DecodeError) unexpected byte at position 0: 0x60 ("`") (jason 1.4.0) lib/jason.ex:92: Jason.decode!/2 (ash_postgres 1.3.16) lib/migration_generator/migration_generator.ex:2333: AshPostgres.MigrationGenerator.load_snapshot/1 (ash_postgres 1.3.16) lib/migration_generator/migration_generator.ex:433: anonymous fn/3 in AshPostgres.MigrationGenerator.deduplicate_snapshots/3 (elixir 1.14.1) lib/enum.ex:1662: anonymous fn/3 in Enum.map/2 (stdlib 4.1.1) maps.erl:411: :maps.fold_1/3 (elixir 1.14.1) lib/enum.ex:2480: Enum.map/2 (ash_postgres 1.3.16) lib/migration_generator/migration_generator.ex:294: anonymous fn/3 in AshPostgres.MigrationGenerator.create_migrations/3 (elixir 1.14.1) lib/enum.ex:980: anonymous fn/3 in Enum.each/2
It looks like there is an error with a JSON file somewhere but I cannot tell which JSON file it should be and/or how I could find out. Can anyone give any pointers as to how to debug this?
Sorry, I am quite a beginner in Elixir/Phoenix/Ash so I apologize if this has quite an obvious solution. I would just like to understand where to start fixing this.
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.