Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.

Home Page:https://insomnia.rest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin Template Tag runs on sync

JeroenVdb opened this issue · comments

Expected Behavior

I don't expect to Template Tag to run during sync.

Actual Behavior

I have the 1Password plugin installed to fetch my secrets from the 1Password vault. The plugin is a Template Tag that I used in the Environments. When doing a request the Tag will run and fetch the 1Password secrets before first requesting me to authorise (1Password prompt).

Screenshot 2024-04-11 at 09 39 48

Insomnia does some syncing every minute (here). When this sync happens the Template Tag run method is also triggered. That means that when Insomnia is running (even in the background) I will get a 1Password prompt because it tries to fetch the secret in the run method. This is not very handy.

The plugin already caches the secret for 1 hour so the prompt only appears once per hour (Insomnia is always running). But getting the prompt every hour is still not plesant.

I do wonder why the Template Tag run method is triggered for the sync. And if it can be disabled or prevented. I would think just the content of the Tag needs to be synced and therefor not be run.

Reproduction Steps

  1. Install 1Password plugin
  2. Use the plugin in the Environments
  3. Use the environment in your request
  4. Do a request
  5. Comply with the 1Password authorisation prompt
  6. Wait for 1 hour
  7. 1Password authorisation prompt appears

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

v8.6.1

What operating system are you using?

macOS

Operating System Version

MacOS 13.6 (22G120)

Installation method

Insomnia.rest

Last Known Working Insomnia version

No response

I think the question boils down to: can we prevent Workspace to be reload/rerendered during a sync.