question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: Error validating model "magento_operation": The index definition refers to the unknown fields bulk_uuid.

See original GitHub issue

See updated output in https://github.com/prisma/prisma2/issues/1909#issuecomment-605374247


Introspecting the Magento schema leads to this error on validate:

Error: Schema parsing
thread 'main' panicked at 'Failed lookup of model or field during internal processing. This means that the internal representation was mutated incorrectly.', libs/datamodel/core/src/validator/standardise.rs:499:40
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1052
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1426
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:204
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:224
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:472
  11: rust_begin_unwind
             at src/libstd/panicking.rs:380
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  13: core::option::expect_failed
             at src/libcore/option.rs:1191
  14: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
  15: <core::iter::adapters::flatten::Flatten<I> as core::iter::traits::iterator::Iterator>::next
  16: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  17: datamodel::validator::standardise::Standardiser::get_datasource_fields_for_relation_field
  18: datamodel::validator::standardise::Standardiser::standardise
  19: datamodel::validator::validation_pipeline::ValidationPipeline::validate
  20: datamodel::parse_datamodel_internal
  21: datamodel::parse_datamodel_and_ignore_env_errors
  22: prisma::cli::CliCommand::dmmf
  23: prisma::main::{{closure}}
  24: <std::future::GenFuture<T> as core::future::future::Future>::poll
  25: tokio::runtime::enter::Enter::block_on
  26: tokio::runtime::thread_pool::ThreadPool::block_on
  27: tokio::runtime::context::enter
  28: tokio::runtime::handle::Handle::enter
  29: prisma::main
  30: std::rt::lang_start::{{closure}}
  31: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  32: std::panicking::try::do_call
             at src/libstd/panicking.rs:305
  33: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:86
  34: std::panicking::try
             at src/libstd/panicking.rs:281
  35: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  36: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  37: main
  38: __libc_start_main
  39: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Introspected schema: https://github.com/prisma/introspection-engine-output/blob/bba8985d4f1ef935ee4e2877fa00a9f02a39b7e4/mariadb/magento.log

(Note that Introspection was changed, and the schema was modified. Here is the old version: https://github.com/prisma/introspection-engine-output/blob/d25101b18050a4ce3244833fa641f8e1b15a6017/mariadb/magento.log The changes I can observe are pretty much in line what we expect.)

(Tested with alpha 944, used to work with ~937)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mavileincommented, Mar 27, 2020

FYI: The validation for that case has improved a lot.

0reactions
do4grcommented, Apr 1, 2020

This is fixed now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Introspection] Indexes on enum fields do not work · Issue #1977
"error: Error validating model 'cube_CubeCart_addressbook': The index definition refers to the unknown fields billing.
Read more >
Prisma: Model with three unique index fields referencing ...
But when I try to execute that mutation, prisma throws the following error: Argument commentId for data.likes.delete.userId_threadId_commentId.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found