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

obsidian d2 plugin (v1.1.4) Doesn't consume TALA license from the json file it asserts it does. #51

Open
wolfspyre opened this issue Dec 9, 2024 · 0 comments

Comments

@wolfspyre
Copy link

wolfspyre commented Dec 9, 2024

I tested to make sure I wasn't insane^H^H^H^H^H^Hmissing something:

  • The plugin says it looks for:
    ~/.local/state/tstruct/auth.json
    and consumes the value of the key api_token for TALA license validation.

  • d2 / tala use ~/.config/tstruct/auth.json in the same format.

  • I validated that d2/tala cli are consuming my license properly:

$ d2 layout tala|grep -E '(API token \(v|Email:|Renewal)'
*** API token (v1) found from ~/.config/tstruct/auth.json ***
Email:        [email protected]
Renewal Date: 30 Nov 25 15:49 CST
  • I validated that the content is the same between ~/.local/state/tstruct/auth.json and ~/.config/tstruct/auth.json:
me@host:~$ md5 /Users/me/.local/state/tstruct/auth.json
MD5 (/Users/me/.local/state/tstruct/auth.json) = 58ef8caefcefb8670bf34583b1bf5282
me@host:~$ md5 ~/.config/tstruct/auth.json
MD5 (/Users/me/.config/tstruct/auth.json) = 58ef8caefcefb8670bf34583b1bf5282

so from a files in place perspective, this should accomplish the needful as far as I can tell;
however:
if I configure the D2 plugin in obsidian to use the TALA layout, and I do NOT paste an api token into the configuration pane within obsidian, diagrams are rendered as unlicensed.

once I paste the exact same value as is stored in the specified json file under the 'api_token' key into the API token window in obsidian, diagrams are properly rendered:

Note - no API key in the config ui:
d2plugin_obsidian_bug_00

validation that the files have the same content, and that the d2 binary sees the license file, and validates it properly:
d2plugin_obsidian_bug_01

SAD PANDA:
d2plugin_obsidian_bug_02

Paste API token into UI:
d2plugin_obsidian_bug_03

LESS?? sad panda...
d2plugin_obsidian_bug_04
(yes it works... but.... )

is there any additional information I can provide about my env that would be helpful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant