DEV: toggling DevTools twice throws webview.internal_toggle_devtools not allowed

Open Beginner friendly
#1,578 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
tauri, vite
Domain
desktop, tooling

Research direction

Start with tauri.conf.json and the main-window capabilities in migrated.json, then reproduce the second DevTools toggle with npm run tauri dev on Windows. Check the relevant webview permissions and verify that opening, closing, and reopening DevTools no longer produces the webview.internal_toggle_devtools not allowed error.

Written by the indexing model from the issue text.

Description

bug
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

Summary

In npm run tauri dev (Windows), DevTools opens once, but after closing and reopening (toggling a second time) the DevTools console shows a permission error: webview.internal_toggle_devtools not allowed.
Steps to reproduce

cd frontend
npm run tauri dev
Focus the PictoPy desktop window
Open DevTools (Ctrl+Shift+I / F12)
Close DevTools
Open DevTools again (same shortcut)
Actual result

Error in DevTools console:
Uncaught (in promise) webview.internal_toggle_devtools not allowed.
Permissions associated with this command: core:webview:allow-internal-toggle-devtools, core:webview:default
Expected result

DevTools should toggle open/close without permission errors in dev mode.
Notes / suspected cause

Main window config sets "devtools": true in tauri.conf.json.
Capabilities for the main window are in migrated.json; it looks like core:webview:allow-internal-toggle-devtools (and possibly core:webview:default) are not granted, so the internal toggle command is blocked.
Environment

OS: Windows 11
App: PictoPy 1.3.0-alpha (from npm run tauri dev)
Frontend: Vite 6.4.1 (from terminal output)

Image
Record
  • I agree to follow this project's Code of Conduct
Dominant language
Python
Stars
322
Forks
793
Avg merge
6d 10h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/PictoPy

All issues in AOSSIE-Org/PictoPy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.