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 validating model even though it is valid

See original GitHub issue

I am getting the following error:

“Provided model ( <model name> ) matched but unitialized or may not contain icon. Refer to https://apple.co/2IhJr0Q, https://apple.co/2Nvshvn and documentation to fill the model correctly.”

After investigating a bit, it seems that the logic in pass.js is as follows:

if (!noDynList.length || !noDynList.some(f => f.toLowerCase().includes("icon"))
    || !remoteFilesList.some(f => f.toLowerCase().includes("icon"))) {
    let eMessage = formatError("MODEL_UNINITIALIZED", path.parse(this.model).name);
    throw new Error(eMessage);
}

This requires me to have an icon both in the noDynList AND the remoteFilesList; surely we only need 1 or the other rather than both?

When I change the code to this it works as I would expect, and I can open the generated pass on my phone:

if (![...noDynList, ...remoteFilesList].some(f => f.toLowerCase().includes("icon"))) {
    let eMessage = formatError("MODEL_UNINITIALIZED", path.parse(this.model).name);
    throw new Error(eMessage);
}

Is my understanding of the expected behavior here wrong? Is the icon actually needed in both lists for some reason?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
alexandercerutticommented, Dec 5, 2018

Hi, you have to fork the repo with the button above, near Star/Unstar. You’ll get the latest version of the repo available on GitHub. Then you’ll have to apply changes on the new repo, through cloning or via Github Web UI.

Once done, you’ll have to go to Pull Requests > New Pull Request. You’ll get this interface. Click on compare across forks and select yours from the right couple of dropdowns, the left one.

image image

Once the pull request gets merged, if you want, you can delete your fork as repo.

😊

1reaction
alexandercerutticommented, Nov 30, 2018

About your last edit, I think that’s not correct because it would mean that an empty model would still be accepted. 😊

Well, about the NFC, it is a bit a problem for me, as I never tested an NFC pass. As I wrote, I just created the interface to set the properties but never tested. I’ll be happy to try to help you as much as I can.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLModel doesn't raise ValidationError · Issue #52 - GitHub
If the model as table=True then validations are disabled, and it assume SQLalchemy will pick up any issues. It then basically drops those...
Read more >
MVC .Net Core Model Validation - The value '' is invalid. Error
In the "Get" Action, I instantiated the object and passed it to the view as the model, even I don't do anything with...
Read more >
Model validation in ASP.NET Core MVC | Microsoft Learn
On the server, a required value is considered missing if the property is null. A non-nullable field is always valid, and the [Required] ......
Read more >
Training & Test Error: Validating Models in Machine Learning
Calculating any form of error rate for a predictive model is called model validation. As we discussed, you need to validate your models...
Read more >
Validate a model—ArcGIS Pro | Documentation
Validating a model checks that all data elements and tool parameter values are valid. ... If the data or value is invalid, an...
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