Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#6449 closed defect (fixed)

Quick Start tutorial links give "Your Internet connection is blocked"

Reported by: Tom Goddard Owned by: Greg Couch
Priority: moderate Milestone: 1.4
Component: Input/Output Version:
Keywords: Cc: chimerax-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description (last modified by Tom Goddard)

On macOS 12.3 my development ChimeraX builds with Qt 6 and unsigned give the message "Your internet access is blocked" in the browser when I click on any command links or on external https links. ChimeraX 1.3 does not have this problem. The internet connection is working and new uncached PDB files can be fetched with the open command. Also if I load a tutorial on the web (e.g. proteasome tutorial) using ChimeraX Help / Tutorials, all of the links in that web hosted tutorial work correctly. So it appears links in the Qt 6 html help browser don't work only if the source file containing the link is a local file.

I also got the same "Your internet access is blocked" clicking on the file history thumbnails on my work Mac (Intel), but not my home laptop Mac (ARM64).

Links like help:user/commands/open.html from the log work.

Since the problem is both on my home network and at UCSF (although slightly different file history behavior), it does not seem to be related to the internet connectivity.

Trying the daily build which uses Qt 6 but is signed does not have this problem. ChimeraX 1.3 which is signed with Qt 5 does not have this problem. A Qt 5 development build from Feb 15 2022 on the office Intel iMac does not have this problem.

So it appears the problem is with just the unsigned Qt 6 app.

Change History (23)

comment:1 by Tom Goddard, 4 years ago

Description: modified (diff)

comment:2 by Tom Goddard, 4 years ago

Uninstalling PyQt6 and installing PyPi PyQt5 in broken Intel Mac build fixes it.
Then uninstalling PyQt5 and installing PyPi PyQt6 returns it to the broken "Your internet access is blocked" state.

So the problem is specific to PyQt6.

comment:3 by Tom Goddard, 4 years ago

Recent Qt bug report (4 days ago) reports same problem on Linux, clicking links in local file gives "Your internet access is blocked"

https://bugreports.qt.io/browse/QTBUG-101920?jql=text%20~%20%22your%20internet%20access%20is%20blocked%22

Today's ChimeraX daily build for Ubuntu 20.04 does not have this problem.

Last edited 4 years ago by Tom Goddard (previous) (diff)

comment:4 by Tom Goddard, 4 years ago

Owner: changed from Tom Goddard to Zach Pearson

Qt 6 problem. Reassigning to Zach who is in charge of that.

comment:5 by Zach Pearson, 4 years ago

Can you try today's daily build? All of the external links in help:credits.html seem to be working OK for me.

comment:6 by Tom Goddard, 4 years ago

As mentioned in the description this problem is just with unsigned (or unnotarized) Qt apps. The daily build is notarized and notarized builds (1.3, daily builds) have not exhibited this problem.

My guess is this is some macOS security measure that stops this unsigned/unnotarized app from doing some kind of network operation. But it fetches files fine using the "open" command, and Qt 5 unsigned works fine. So it seems like a specific Qt 6 deficiency.

Last edited 4 years ago by Tom Goddard (previous) (diff)

comment:7 by Tom Goddard, 4 years ago

Building ChimeraX daily build with PyQt 6.2.3 licensed wheels using make "install-rbvi" target does not have this problem, even though the app is not signed.
Then uninstalling the licensed PyQt6 6.2.3 and installing the PyPi PyQt6 6.2.2 brings the error back. Trying current PyPi PyQt 6.2.3, PyQt-sip 13.2.1 and PyQt6-WebEngine 6.2.1 still has the error. The PyPi current version uses Qt 6.2.4 while our licensed wheels are using Qt 6.2.3. So the bug could have been introduced in going from 6.2.3 to 6.2.4 but that seems unlikely. I tried PyPi PyQt with PyQt-Qt 6.2.3 and it also does not work. So it is not a new bug in Qt 6.2.4.

comment:8 by Tom Goddard, 4 years ago

So the licensed PyQt 6 wheels work but the PyPi gpl PyQt 6 wheels exhibit this bug, even when the version numbers are identical. Not sure where to go from here.

Here is the PyPi install

$ make app-install
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.wheel.qt6 VERSION=6.2 PYQT_MINOR_VERSION=3 QT_MINOR_VERSION=3 PYQTWE_MINOR_VERSION=1 PYQT_LICENSE=gpl app-install
/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/bin/python3.9 -I -m pip --log pip.log install -U PyQt6-sip==13.2.0 PyQt6==6.2.3 PyQt6_WebEngine==6.2.1
Collecting PyQt6-sip==13.2.0
  Using cached PyQt6_sip-13.2.0-cp39-cp39-macosx_10_9_x86_64.whl (76 kB)
Collecting PyQt6==6.2.3
  Using cached PyQt6-6.2.3-cp36-abi3-macosx_10_14_universal2.whl (11.6 MB)
Collecting PyQt6_WebEngine==6.2.1
  Using cached PyQt6_WebEngine-6.2.1-cp36-abi3-macosx_10_14_universal2.whl (357 kB)
Collecting PyQt6-Qt6>=6.2.3
  Using cached PyQt6_Qt6-6.2.4-py3-none-macosx_10_14_x86_64.whl (33.2 MB)
Collecting PyQt6-WebEngine-Qt6>=6.2.1
  Using cached PyQt6_WebEngine_Qt6-6.2.4-py3-none-macosx_10_14_x86_64.whl (81.5 MB)
Installing collected packages: PyQt6-sip, PyQt6-Qt6, PyQt6-WebEngine-Qt6, PyQt6, PyQt6-WebEngine
  WARNING: The scripts pylupdate6 and pyuic6 are installed in '/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyQt6-6.2.3 PyQt6-Qt6-6.2.4 PyQt6-WebEngine-6.2.1 PyQt6-WebEngine-Qt6-6.2.4 PyQt6-sip-13.2.0
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/bin/python3.9 -m pip install --upgrade pip' command.

And the commercial wheel install

$ make PYQT_LICENSE=commercial app-install
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.wheel.qt6 VERSION=6.2 PYQT_MINOR_VERSION=3 QT_MINOR_VERSION=3 PYQTWE_MINOR_VERSION=1 PYQT_LICENSE=commercial app-install
/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/bin/python3.9 -I -m pip --log pip.log install -U PyQt6-sip==13.2.0 PyQt6_commercial-6.2.3-6.2.3-cp36-abi3-macosx_10_14_universal2.whl PyQt6_WebEngine_commercial-6.2.1-6.2.3-cp36-abi3-macosx_10_14_universal2.whl
Processing ./PyQt6_commercial-6.2.3-6.2.3-cp36-abi3-macosx_10_14_universal2.whl
Processing ./PyQt6_WebEngine_commercial-6.2.1-6.2.3-cp36-abi3-macosx_10_14_universal2.whl
Collecting PyQt6-sip==13.2.0
  Using cached PyQt6_sip-13.2.0-cp39-cp39-macosx_10_9_x86_64.whl (76 kB)
Installing collected packages: PyQt6-sip, PyQt6-commercial, PyQt6-WebEngine-commercial
  WARNING: The scripts pylupdate6 and pyuic6 are installed in '/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyQt6-WebEngine-commercial-6.2.1 PyQt6-commercial-6.2.3 PyQt6-sip-13.2.0
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/bin/python3.9 -m pip install --upgrade pip' command.

comment:9 by Tom Goddard, 4 years ago

So the error is not related to notarized versus unnotarized, instead it is PyPi gpl PyQt (not working) versus our licensed PyQt (working).

Let's wait for PyQt 6.3 and see if this bug goes away.

comment:10 by Eric Pettersen, 4 years ago

Pretty sure this is the chromium subprocess not being able to access Documents/Downloads/Desktop with explicit user permission on Mac.

Version 0, edited 4 years ago by Eric Pettersen (next)

comment:11 by Tom Goddard, 4 years ago

Cc: chimerax-programmers added
Milestone: 1.4

Both Elaine and Eric have seen this error in recent ChimeraX daily builds which presumably were notarized and of course used licensed wheels.

Would be helpful if Eric and Elaine can recall what Mac (Intel or arm64) and what macOS they were using when they saw this. I saw it happen to Elaine in group meeting.

comment:12 by Tom Goddard, 4 years ago

I built from scratch a development build on Intel Mac today and the file history worked, but the Quick Start command link "style /b stick" gave no internet access. I installed today's daily build and file history fails with no internet access, and the Quick Start style command link fails. Then I went back to the developer build and its file history now fails. A march 30 2022 daily build works, both file history and quick start. All these tests on an Intel Mac (descartes.cgl.ucsf.edu, macOS 12.3.1).

So it looks a lot like uninitialized memory is determining whether it gives the no internet access error.

comment:13 by Tom Goddard, 4 years ago

Greg suggested that there are some flags regarding local files and cross-origin urls in registering a QtWebEngine scheme that may need to be set to fix this bug.

comment:14 by Tom Goddard, 4 years ago

On my Intel Mac development build the file history and help viewer links are broken with Qt 6.2.4 but all work with Qt 6.2.3 as set in prereqs/PyQt/Makefile QT_MINOR_VERSION = 3. So it maybe be a Qt 6.2.3 to 6.2.4 change that broke the links. The Qt bug report on linux for this problem was also reported a month ago in Qt 6.2.4.

comment:15 by Tom Goddard, 4 years ago

Greg observed the same problems in file history and help viewer on Linux. He tested Qt 6.3.0 and observed same problems.

comment:16 by Greg Couch, 4 years ago

And it reproduces on Windows, just like Linux. File history works, but (cxcmd, https) links in the help viewer do not. If the cxcmd scheme is flagged LocalScheme, then the file history doesn't work, but cxcmd works in the help viewer.

in reply to:  17 ; comment:17 by Tom Goddard, 4 years ago

Maybe the difference between file history and the help viewer is that file history does not set any base URL since it produces the html in memory while the help viewer loads a file and probably sets the base url to that file.

in reply to:  18 ; comment:18 by Tom Goddard, 4 years ago

But both file history and help viewer links fail in today's (April 21) Mac ChimeraX daily build.  So the behavior is not totally consistent between Mac, Linux, Windows.

comment:19 by Greg Couch, 4 years ago

Owner: changed from Zach Pearson to Greg Couch

comment:20 by Greg Couch, 4 years ago

Resolution: fixed
Status: assignedclosed

Fixed by setting WebAttribute.LocalContentCanAccessRemoteUrls. It's unclear why this wasn't needed before.

comment:21 by Greg Couch, 4 years ago

Please test the daily build and your private build and confirm that the "Your Internet connection is blocked" is fixed.

comment:22 by Tom Goddard, 4 years ago

I tested today's daily build and made a new development build for Mac arm64 and links in file history and help viewer and log all worked correctly with no internet connection is blocked messages. Tests were on macOS 12.3.1 with M1Max arm64 cpu.

comment:23 by Eric Pettersen, 4 years ago

Yes, fixed!

Note: See TracTickets for help on using tickets.