Skip to content

Remove native messaging#14884

Draft
koppor wants to merge 5 commits into
mainfrom
remove-native-messaging-at-installation
Draft

Remove native messaging#14884
koppor wants to merge 5 commits into
mainfrom
remove-native-messaging-at-installation

Conversation

@koppor

@koppor koppor commented Jan 20, 2026

Copy link
Copy Markdown
Member

User description

Follow-up to #14855

With the re-written browser extension (https://github.com/JabRef/JabRef-Browser-Extension), no native messaging is requried any more.

Steps to test

  1. Install JabRef
  2. Install Browser extension from source.
  3. Try if browser connection can connect to JabRef

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • [/] I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [/] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

PR Type

Enhancement


Description

  • Remove native messaging host scripts and configuration files

  • Eliminate browser extension integration from installation packages

  • Simplify build configuration by removing native messaging resources

  • Update installation scripts to remove native messaging setup


Diagram Walkthrough

flowchart LR
  A["Native Messaging<br/>Host Scripts"] -->|removed| B["Linux/macOS/<br/>Windows Hosts"]
  C["Browser Extension<br/>Config Files"] -->|removed| D["Firefox/Chrome/<br/>Chromium Configs"]
  E["Installation<br/>Scripts"] -->|updated| F["Debian/RPM/<br/>macOS/Snap"]
  G["Build<br/>Configuration"] -->|simplified| H["Gradle Build<br/>Resources"]
Loading

File Walkthrough

Relevant files
Enhancement
20 files
jabrefHost.py
Remove Linux native messaging host script                               
+0/-131 
jabrefHost.py
Remove macOS native messaging host script                               
+0/-101 
JabRefHost.ps1
Remove Windows PowerShell native messaging script               
+0/-54   
JabRefHost.bat
Remove Windows batch native messaging launcher                     
+0/-20   
bifehkofibaamoeaopjglfkddgkijdlh.json
Remove Chromium browser extension auto-install config       
+0/-3     
org.jabref.jabref.json
Remove Chromium native messaging host configuration           
+0/-10   
org.jabref.jabref.json
Remove Firefox native messaging host configuration             
+0/-10   
bifehkofibaamoeaopjglfkddgkijdlh.json
Remove macOS Chromium browser extension config                     
+0/-3     
org.jabref.jabref.json
Remove macOS Chromium native messaging config                       
+0/-10   
org.jabref.jabref.json
Remove macOS Firefox native messaging config                         
+0/-7     
jabref-chrome.json
Remove Windows Chrome native messaging config                       
+0/-10   
jabref-firefox.json
Remove Windows Firefox native messaging config                     
+0/-10   
connect-plug-etc-chromium-native-messaging-jabref
Remove Snap Chromium native messaging hook                             
+0/-9     
connect-plug-etc-opt-chrome-native-messaging-jabref
Remove Snap Chrome native messaging hook                                 
+0/-9     
connect-plug-etc-opt-edge-native-messaging-jabref
Remove Snap Edge native messaging hook                                     
+0/-9     
connect-plug-hostfs-mozilla-native-messaging-jabref
Remove Snap Firefox native messaging hook                               
+0/-9     
disconnect-plug-etc-chromium-native-messaging-jabref
Remove Snap Chromium disconnect hook                                         
+0/-7     
disconnect-plug-etc-opt-chrome-native-messaging-jabref
Remove Snap Chrome disconnect hook                                             
+0/-7     
disconnect-plug-etc-opt-edge-native-messaging-jabref
Remove Snap Edge disconnect hook                                                 
+0/-7     
disconnect-plug-hostfs-mozilla-native-messaging-jabref
Remove Snap Firefox disconnect hook                                           
+0/-7     
Configuration changes
6 files
build.gradle.kts
Remove native messaging resources from build packaging     
+0/-13   
jabref.spec
Remove native messaging installation from RPM spec             
+2/-16   
postinst
Remove native messaging setup from Debian postinstall       
+3/-8     
postrm
Remove native messaging cleanup from Debian uninstall       
+0/-9     
postinstall
Remove native messaging setup from macOS installer             
+2/-11   
snapcraft.yaml
Remove native messaging plugs and browser-proxy app           
+0/-21   

@koppor koppor added this to the 6.0-alpha.5 milestone Jan 20, 2026
@koppor koppor added the dev: binaries Binary builds should be uploaded to builds.jabref.org label Jan 20, 2026
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Ensure cleanup of old files

Retain the cleanup logic in jabgui/buildres/linux/postrm for native messaging
host files to ensure a clean upgrade path for users and prevent orphaned files.

jabgui/buildres/linux/postrm [20-25]

 case "$1" in
     purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        # Remove the native-messaging hosts script only if relative to the deb package
+        for NATIVE_MESSAGING_JSON in "/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json"\
+                                     "/etc/chromium/native-messaging-hosts/org.jabref.jabref.json"\
+                                     "/etc/opt/chrome/native-messaging-hosts/org.jabref.jabref.json"\
+                                     "/etc/opt/edge/native-messaging-hosts/org.jabref.jabref.json"; do
+            if [ -e $NATIVE_MESSAGING_JSON ] && grep --quiet '"path": "/opt' $NATIVE_MESSAGING_JSON; then
+                rm -f $NATIVE_MESSAGING_JSON
+            fi
+        done
         # Remove the auto-install triggers of the browser addon for chrom/chromium
         rm -f /opt/google/chrome/extensions/bifehkofibaamoeaopjglfkddgkijdlh.json
         rm -f /usr/share/google-chrome/extensions/bifehkofibaamoeaopjglfkddgkijdlh.json
     ;;

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that removing the cleanup logic from the postrm script will leave orphaned files on users' systems when upgrading, which is poor package management practice.

Medium
  • Update

@Siedlerchr

Copy link
Copy Markdown
Member

We should really wait that we have the new extension published first

@koppor koppor modified the milestones: 6.0-alpha.5, 6.0-beta Jan 20, 2026
calixtus
calixtus previously approved these changes Jan 21, 2026
@calixtus calixtus added this pull request to the merge queue Jan 21, 2026
@calixtus calixtus removed this pull request from the merge queue due to a manual request Jan 21, 2026
@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Jan 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Your pull request conflicts with the target branch.

Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.

…ging-at-installation

* upstream/main:
  Use LTWA file from mirror (#14892)
  Re-enable JavaDoc formatting (#14860)
  chore(deps): update dependency org.glassfish.grizzly:grizzly-http-server to v5 (#14882)
  chore(deps): update dependency org.glassfish.grizzly:grizzly-framework to v5 (#14881)
  Chore(deps): Bump jablib/src/main/resources/csl-styles (#14864)
  chore(deps): update dependency com.konghq:unirest-modules-gson to v4.7.4 (#14880)
…ging-at-installation

* upstream/main:
  Update Junie workflow to junie-github-action
  chore(deps): update jackson monorepo to v3.0.4 (#14894)
  Markdown-only JavaDoc: Full JEP-467 (#14891)
  update h2 (#14887)
  Remove grizzly-websockets also at .jbang/JabSrvLauncher.java (#14888)
@koppor

koppor commented Jan 27, 2026

Copy link
Copy Markdown
Member Author

Will probably a longer discussion - JabRef/JabRef-Browser-Extension-fresh#18

The maintainer of the 2025 extensions is not convinced of HTTP being the more proper interface. Main reason: Starting of JabRef and then doing an HTTP call is sometimes unreliable.

@koppor koppor marked this pull request as draft January 27, 2026 20:56
@github-actions

Copy link
Copy Markdown
Contributor

The build of this PR is available at https://builds.jabref.org/pull/14884/merge.

@koppor koppor removed the dev: binaries Binary builds should be uploaded to builds.jabref.org label Jan 27, 2026
@Siedlerchr Siedlerchr removed this from the 6.0-alpha.6 milestone Mar 16, 2026
@Siedlerchr Siedlerchr added this to the 6.0-beta milestone Mar 16, 2026
@Siedlerchr

Copy link
Copy Markdown
Member

I postponed this to beta until we have cusotm url protocol handling in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants