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

Example script 'Activity Tracker' doesn't work #167

Closed
3 of 7 tasks
simonfossom opened this issue Dec 27, 2023 · 7 comments
Closed
3 of 7 tasks

Example script 'Activity Tracker' doesn't work #167

simonfossom opened this issue Dec 27, 2023 · 7 comments
Labels
bug Undesired behavior caused by this plugin example vault

Comments

@simonfossom
Copy link

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

0.10.2

Describe the Issue

Example script 'Activity Tracker' trows error:

Failed to execute JS
Failed to execute JS during execution "6509f34a-6763-41f0-8df3-aced42ef130c"

Error: [MB_VALIDATION] "failed to validate parser result" caused by "Failed to parse bind target. Bind target storage path is undefined."

    at Pc.validateStoragePathAsFilePath (plugin:obsidian-meta-bind-plugin:49:9778)
    at Pc.validateBindTarget (plugin:obsidian-meta-bind-plugin:49:8229)
    at Pc.parseAndValidateBindTarget (plugin:obsidian-meta-bind-plugin:49:7853)
    at Am.createBindTarget (plugin:obsidian-meta-bind-plugin:102:2941)
    at qo.eval [as func] (eval at buildFunction (plugin:js-engine), <anonymous>:5:23)
    at qo.runFunction (plugin:js-engine:39:79271)
    at zo.execute (plugin:js-engine:39:84539)
    at Or.tryRun (plugin:js-engine:39:19287)
    at Or.renderResults (plugin:js-engine:39:19474)
    at Or.render (plugin:js-engine:39:20168)

Steps to Reproduce

open the note from the link: https://github.com/mProjectsCode/obsidian-meta-bind-plugin/blob/0213492d77966304668eb5429f50cc23808aa4f8/exampleVault/Advanced%20Examples/Activity%20Tracker.md

Expected Behavior

Script should execute.

@simonfossom simonfossom added the bug Undesired behavior caused by this plugin label Dec 27, 2023
@mProjectsCode
Copy link
Owner

yeah, that is still using the old syntax. I will update this soon.

@mProjectsCode
Copy link
Owner

should be fixed now

@simonfossom
Copy link
Author

@mProjectsCode sorry for late reaction but the problem persists in my vault. tried on clean vault same error.

Screenshot 2024-01-07 at 22 59 04

@mProjectsCode mProjectsCode reopened this Jan 7, 2024
@mProjectsCode
Copy link
Owner

Did you copy the example from the latest commit of the master branch? Because that version works for me without any problems.

@simonfossom
Copy link
Author

simonfossom commented Jan 8, 2024

Yes! sorry. my bad. works. I must of copied the old code

@LynetteCullens
Copy link

LynetteCullens commented Apr 7, 2024

Activity Tracker and PF2e Encounter Calculator are not working in the example vault. All JavaScript codes are broken in the example vault.

Failed to execute JS
Failed to execute JS during execution "909030fd-61ea-407d-8774-f419e44c0ba2"

Error: [MB_INTERNAL] "invalid arguments supplied to function" caused by error "[
  {
    "code": "invalid_type",
    "expected": "array",
    "received": "undefined",
    "path": [
      "property"
    ],
    "message": "Required"
  }
]"
    at jr (plugin:obsidian-meta-bind-plugin:110:56155)
    at Ah.createBindTarget (plugin:obsidian-meta-bind-plugin:111:17437)
    at Bo.eval [as func] (eval at buildFunction (plugin:js-engine), <anonymous>:5:23)
    at Bo.runFunction (plugin:js-engine:45:61422)
    at Go.execute (plugin:js-engine:45:66794)
    at qr.tryRun (plugin:js-engine:45:1053)
    at qr.renderResults (plugin:js-engine:45:1240)
    at qr.render (plugin:js-engine:45:1934)
    at qr.onload (plugin:js-engine:45:2188)
    at e.load (app://obsidian.md/app.js:1:1167250)

@mProjectsCode mProjectsCode reopened this Apr 7, 2024
@mProjectsCode
Copy link
Owner

I updated the example to use the new API. I also had to fix a few things in the plugin which I overlooked in the 1.0 release. I will release an update to the plugin possibly later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behavior caused by this plugin example vault
Projects
None yet
Development

No branches or pull requests

3 participants