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

"500 Other Error: Schema IRI Empty" and "Policy does not exist" During Dry-Run of Policy with Newly Created Tool #4094

Closed
erikamoji opened this issue Aug 29, 2024 · 18 comments
Assignees
Labels
bug Something isn't working

Comments

@erikamoji
Copy link
Contributor

Problem description

When attempting a dry-run of a policy that incorporates a newly created and published tool, we are encountering the following errors:

  • 500 Other Error: Schema IRI Empty
  • Policy does not exist

These errors appear after the tool is published and included in the policy configuration. There is no further context provided by the error message, and we are unable to proceed with the dry-run under these conditions.

Step to reproduce

  1. Create a new tool within the MGS platform.
  2. Publish the tool.
  3. Add the newly created tool to a policy.
  4. Attempt to run a dry-run of the policy with the tool included.
  5. Observe the error messages.

Expected behavior

The dry-run should execute successfully without error when a valid, published tool is included in the policy.

Troubleshooting Steps Taken:

  • Validated the policy with and without the newly created tools; both cases showed no validation issues.
  • Successfully performed a dry-run without the tools.
  • Successfully ran a dry-run using tools imported via open-source (e.g., CDM Tool 01).
  • Ensured our configuration inside the UI matches other tools, aside from naming conventions and schemas.

Additional Information:

  • There appears to be no existing documentation on Schema IRIs.
  • We have attached the problematic tools for review (in email sent directly to MGS team @anvabr @prernaadev01)
  • If there is any additional information needed, please let us know.

Screenshots

Screenshot 2024-08-29 031406

@anvabr
Copy link
Collaborator

anvabr commented Sep 3, 2024

@erikamoji so far we have not been able to reproduce the error you describe, because we've discovered that the Tool file that the policy references does not seem to be accessible in IPFS. Looking at the message ID 1724935433.754979003 the tool files CID in IPFS: Qmdv88UWXJkruBp5oP1kaF4fdUoce4aJYpHX2uvsEd3AYc (or in v1: bafybeihhoj4yfvyx7dnekz35mrehmoggxofpuntakhh77gqdw7gu5pb4du). Our attempts to access it manually via IPFS gateway were also unsuccessful. Can you please shed some light on how this Tool was published?

@erikamoji
Copy link
Contributor Author

@anvabr thanks for looking into the issue. the tool was published via the UI, within the tool dashboard using the publish button.

Screenshot 2024-09-03 070626

@anvabr
Copy link
Collaborator

anvabr commented Sep 5, 2024

@erikamoji we've been investigating this. It turns out that your tenant is configured with a local IPFS node, which means everything that's published on IPFS is only accessible to you. That's why we can't import your Tool - it's been published locally.

Can you please send us the Tool file here or via Slack so we can try to reproduce the issue?

@erikamoji
Copy link
Contributor Author

@anvabr My partner attached the Tool files in our email to you and @prernaadev01 (29 August). Please let us know if you need us to send it again.

@prernaadev01
Copy link
Collaborator

@erikamoji Thank you so much for the info. We are looking at it. Will keep you posted.

@prernaadev01
Copy link
Collaborator

@erikamoji We tried importing the tool, which you provided and it works for us.
So, Can you please try to import your policy with new Tool 04 and run it in Dry Run mode. Please use this Tool 04 IPFS messageId is 1725636668.046506812.

@erikamoji
Copy link
Contributor Author

erikamoji commented Sep 9, 2024

@prernaadev01 We successfully imported the tool, added it to the policy and ran it in Dry Run mode. Unfortunately, we are getting the same errors. Attached is a video of our process and as you can see, it is the correct tool with message ID 1725636668.046506812

Recording.2024-09-09.085244.mp4

Please let us know if you need anything else from our end.

@prernaadev01
Copy link
Collaborator

@kirill-tolochko Can you please check this video once

@prernaadev01
Copy link
Collaborator

@erikamoji Thank you so much for the video. Looks like you are trying to switch from Tool 01 to Tool 4 in policy configurator. But we would suggest you to please update the tool while importing the policy as shown below. Please update the Tool 4 message ID in the field shown in the below image.

image

@erikamoji
Copy link
Contributor Author

@prernaadev01 I import the Tool from the sidebar by dragging it into the policy. When I drag a Tool from the sidebar, it automatically renames the Tool, regardless of which one I select. I have attached a video demonstrating this behavior.

To ensure I am following the correct process, I would appreciate a detailed video tutorial on how to import Tools using your preferred method. This should include steps from initial selection to loading the Tool into Dry Run after clicking "Go."

I am unable to locate the specific reference you are making in the provided image

Recording.2024-09-10.090148.mp4

@prernaadev01
Copy link
Collaborator

prernaadev01 commented Sep 10, 2024 via email

@prernaadev01
Copy link
Collaborator

@erikamoji Please check this once:
chrome_jo5xJhDIFA

@erikamoji
Copy link
Contributor Author

@prernaadev01 Thanks! I'll check it out and get back to you!

@erikamoji
Copy link
Contributor Author

@prernaadev01

Thank you for your assistance so far. We wanted to provide an update regarding the issue we're experiencing with the policy Dry Run.

We found that exporting the entire VM0003 policy with the tools, then importing them back, allowed the Dry Run to work. The error only occurs when we work within the initially created policy where tools are published and imported, but a Dry Run is attempted without exporting and re-importing the policy.

Additionally, we are encountering an integration error specifically with AR Tool 03 and AR Tool 04, despite them being formatted similarly to CDM Tool 01. Could you review and provide guidance on this?

Here are a few specifics:

  • The Dry Run produces a PPD only when using Tool 01.
  • We have tried importing each tool individually and running the Dry Run after each import. The spinning loader issue occurs only with AR Tool 03 and AR Tool 04, even when using the version provided by MGS with message ID 1725636668.046506812.
  • This issue arises regardless of whether the tool has a calculation within the schema.

Could the MGS team test a Dry Run on their end where a PPD is attempted to be created? Alternatively, could you check AR Tools 03 and 04 to provide guidance on this?

We have reviewed all available documentation for Tools, including the demo video, but unfortunately, it does not cover this specific issue.

For convenience, we have attached the policy again (in an email) with the tools for your review.

Thank you for your continued support, and we look forward to your guidance.

@prernaadev01
Copy link
Collaborator

@erikamoji Thank you so much for the policy file and specifics. We are looking at it and will get back to you asap.

@erikamoji
Copy link
Contributor Author

erikamoji commented Sep 13, 2024

@prernaadev01 Thank you for your help with the issues related to the tools so far. We have resolved the issue with AR Tool 04 and are currently working on AR Tool 03. We’ll reach out if we encounter any further issues with Tool 03.

However, we are still encountering issues with AR Tool 03, specifically in regard to calculations.

  • For customLogicBlock, we have implemented the JavaScript according to the example document provided by @anvabr, replacing the necessary variables and calculations. However, when we attempt a Dry Run, we encounter an infinite loading spinner after clicking "Create" for the PPD.
  • For Calculate + mathAddOnBlock, we are receiving an "extractDataBlock: invalid documents count" error after clicking "Create" for the PPD.

To assist with troubleshooting, we have attached (in an email) two policy files—one for each implementation of AR Tool 03—along with the relevant tool files. Additionally, we have included the Excel spreadsheet schema for the tool, which outlines the formulas, for your reference.

We greatly appreciate your continued assistance in resolving these issues.

@erikamoji
Copy link
Contributor Author

@prernaadev01 @anvabr thank you so much for your help thus far. we have actually managed to figure out the issue, but we appreciate all the assistance you've given us. i'm closing this bug issue :)

@prernaadev01
Copy link
Collaborator

@erikamoji Its fantastic news.
As, we were also working on the issues, we wanted to share the version of the policy file in your email, just for your reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@anvabr @erikamoji @artembuslaev @prernaadev01 @kirill-tolochko and others