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

The plugin cannot connect to the server #70

Closed
saberraz opened this issue Nov 20, 2019 · 27 comments · Fixed by MerginMaps/python-api-client#39
Closed

The plugin cannot connect to the server #70

saberraz opened this issue Nov 20, 2019 · 27 comments · Fixed by MerginMaps/python-api-client#39
Assignees
Labels
bug Something isn't working

Comments

@saberraz
Copy link
Contributor

saberraz commented Nov 20, 2019

https://twitter.com/willadam/status/1197263837608792066
It comes up with incorrect URL:
EJ1_H-EWwAEkcWb

@saberraz saberraz added the bug Something isn't working label Nov 20, 2019
@saberraz
Copy link
Contributor Author

saberraz commented Nov 20, 2019

Could you check if you are behind a proxy?
Worth changing the proxy settings under Network (Settings > Options and then select Use proxy for web access, select DefaultProxy for your proxy type).

User confirmed that it is a direct access to the internet

@saberraz
Copy link
Contributor Author

Could you provide the following information:

  • Plugin version
  • QGIS version
  • macOS version
  • QGIS installation method (e.g. Kyngchaos or one-click installer)
  • Any log messages from QGIS log panel

@saberraz
Copy link
Contributor Author

saberraz commented Nov 21, 2019

  • 2019.6
  • 3.4.13
  • 10.13.3
  • One-click installer

@PeterPetrik PeterPetrik changed the title The plugin cannot connect to the server in macos The plugin cannot connect to the server in macos 10.13 Nov 27, 2019
@saberraz saberraz added this to To Do in Plugin Dev Dec 2, 2019
@saberraz
Copy link
Contributor Author

saberraz commented Dec 2, 2019

This is very likely to be due to the old version of macOS. I cannot replicate it in the latest two versions.

@varmar05 varmar05 removed this from To Do in Plugin Dev Jan 7, 2020
@NicolasSironi
Copy link

Hi there, I'm having the exact same issue:

Plug-in 2019.6
QGIS 3.4.13 LTR just reinstalled using one-click installer
Mac OS X 10.15.2

thanks for your help!

@saberraz
Copy link
Contributor Author

saberraz commented Jan 8, 2020

@NicolasSironi would it be possible to post some of the python/plugin error logs here.

@NicolasSironi
Copy link

NicolasSironi commented Jan 8, 2020

Thanks for your quick answer,

I though I might try with the latest one click installer of QGIS 3.10, do you think it may work with that version?

here is a Python error log:

2020-01-08T10:17:34 WARNING warning:/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/matplotlib/cbook/init.py:424: MatplotlibDeprecationWarning:

         Passing one of 'on', 'true', 'off', 'false' as a boolean is deprecated; use an actual boolean (True/False) instead.
         
         
         traceback: File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py", line 1301, in newProjectLoaded
          cfg.spSigPlot.refreshPlot()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/spectralsignature/spectralsignatureplot.py", line 463, in refreshPlot
          self.signaturePlot()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/spectralsignature/spectralsignatureplot.py", line 646, in signaturePlot
          cfg.uisp.Sig_Widget.sigCanvas.ax.grid('on')
          File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/matplotlib/axes/_base.py", line 2761, in grid
          b = _string_to_bool(b)
          File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/matplotlib/cbook/__init__.py", line 424, in _string_to_bool
          warn_deprecated("2.2", "Passing one of 'on', 'true', 'off', 'false' as a "
          File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/matplotlib/cbook/deprecation.py", line 112, in warn_deprecated
          warnings.warn(message, category, stacklevel=2)

@saberraz
Copy link
Contributor Author

saberraz commented Jan 8, 2020

Thanks @NicolasSironi

There is no error related to the mergin plugin. This is a strange one.

If you could install 3.10 (which should be possible to have it side-by-side with 3.4) and see if you have the same issue.

@NicolasSironi
Copy link

Just freshly installed 3.10, when configurating the plugin, it asked my main password to retrieve the saved login and password. Then when testing the connection the error "connection failed, incorrect URL" shows up.

here the logs:

2020-01-08T10:32:07 WARNING warning:/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py:744: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
mod = _builtin_import(name, globals, locals, fromlist, level)

         traceback: File "", line 1, in 
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 354, in startPlugin
          if not _startPlugin(packageName):
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin
          plugins[packageName] = package.classFactory(iface)
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/__init__.py", line 65, in classFactory
          from .semiautomaticclassificationplugin import SemiAutomaticClassificationPlugin
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py", line 68, in 
          from osgeo import gdal
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/osgeo/__init__.py", line 21, in 
          _gdal = swig_import_helper()
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/osgeo/__init__.py", line 8, in swig_import_helper
          import imp
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/imp.py", line 33, in 
          DeprecationWarning, stacklevel=2)

2020-01-08T10:32:08 WARNING warning:/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/pyparsing.py:3077: DeprecationWarning: invalid escape sequence \w
"""

         traceback: File "", line 1, in 
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 354, in startPlugin
          if not _startPlugin(packageName):
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin
          plugins[packageName] = package.classFactory(iface)
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/__init__.py", line 65, in classFactory
          from .semiautomaticclassificationplugin import SemiAutomaticClassificationPlugin
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py", line 75, in 
          from .ui.semiautomaticclassificationplugindialog import SemiAutomaticClassificationPluginDialog
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/ui/semiautomaticclassificationplugindialog.py", line 39, in 
          from .ui_semiautomaticclassificationplugin_scatter_plot import Ui_ScatterPlot
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/ui/ui_semiautomaticclassificationplugin_scatter_plot.py", line 453, in 
          from .scatterwidget2 import ScatterWidget2
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/ui/scatterwidget2.py", line 39, in 
          import matplotlib
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/matplotlib/__init__.py", line 141, in 
          from . import cbook, rcsetup
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1035, in _handle_fromlist
          File "", line 219, in _call_with_frames_removed
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/matplotlib/rcsetup.py", line 25, in 
          from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/matplotlib/fontconfig_pattern.py", line 19, in 
          from pyparsing import (Literal, ZeroOrMore, Optional, Regex, StringEnd,
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 724, in exec_module
          File "", line 860, in get_code
          File "", line 791, in source_to_code
          File "", line 219, in _call_with_frames_removed

2020-01-08T10:32:13 WARNING warning:/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py:1254: ResourceWarning: unclosed file
htmlText = open(lWelcome, 'r').read()

         traceback: File "", line 1, in 
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 359, in startPlugin
          plugins[packageName].initGui()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py", line 1254, in initGui
          htmlText = open(lWelcome, 'r').read()

2020-01-08T10:32:13 WARNING warning:/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/input.py:459: ResourceWarning: unclosed file
htmlText = open(l, 'r').read()

         traceback: File "", line 1, in 
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 359, in startPlugin
          plugins[packageName].initGui()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py", line 1263, in initGui
          cfg.ipt.welcomeText("https://semiautomaticgit.github.io/SemiAutomaticClassificationPluginWelcome/welcome" + "_" + dStr + ".html", "https://semiautomaticgit.github.io/SemiAutomaticClassificationPluginWelcome/welcome.html")
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/core/input.py", line 459, in welcomeText
          htmlText = open(l, 'r').read()

2020-01-08T10:32:16 WARNING warning:/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)

         traceback: File "", line 1, in 
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 359, in startPlugin
          plugins[packageName].initGui()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/quick_map_services.py", line 121, in initGui
          self.init_server_panel()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/quick_map_services.py", line 311, in init_server_panel
          self.server_toolbox = QmsServiceToolbox(self.iface)
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/qms_service_toolbox.py", line 155, in __init__
          self.show_news()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/qms_service_toolbox.py", line 160, in show_news
          qms_news = client.get_news()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/qms_external_api_python/api/api_abstract.py", line 64, in get_news
          response = get(url, verify=False)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/requests/api.py", line 75, in get
          return request('get', url, params=params, **kwargs)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/requests/api.py", line 60, in request
          return session.request(method=method, url=url, **kwargs)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/requests/sessions.py", line 533, in request
          resp = self.send(prep, **send_kwargs)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/requests/sessions.py", line 646, in send
          r = adapter.send(request, **kwargs)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/requests/adapters.py", line 449, in send
          timeout=timeout
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/urllib3/connectionpool.py", line 603, in urlopen
          chunked=chunked)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/urllib3/connectionpool.py", line 344, in _make_request
          self._validate_conn(conn)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/urllib3/connectionpool.py", line 851, in _validate_conn
          InsecureRequestWarning)

2020-01-08T10:32:23 WARNING warning:/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/matplotlib/cbook/init.py:424: MatplotlibDeprecationWarning:
Passing one of 'on', 'true', 'off', 'false' as a boolean is deprecated; use an actual boolean (True/False) instead.
warn_deprecated("2.2", "Passing one of 'on', 'true', 'off', 'false' as a "

         traceback: File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py", line 1301, in newProjectLoaded
          cfg.spSigPlot.refreshPlot()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/spectralsignature/spectralsignatureplot.py", line 463, in refreshPlot
          self.signaturePlot()
          File "/Users/Nik/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/spectralsignature/spectralsignatureplot.py", line 646, in signaturePlot
          cfg.uisp.Sig_Widget.sigCanvas.ax.grid('on')
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/matplotlib/axes/_base.py", line 2761, in grid
          b = _string_to_bool(b)
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/matplotlib/cbook/__init__.py", line 424, in _string_to_bool
          warn_deprecated("2.2", "Passing one of 'on', 'true', 'off', 'false' as a "
          File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/matplotlib/cbook/deprecation.py", line 112, in warn_deprecated
          warnings.warn(message, category, stacklevel=2)

@NicolasSironi
Copy link

Any update on the problem?

@saberraz
Copy link
Contributor Author

Would it be possible to update to the new release of the plugin (2020.01) and see if you have the same problem?

@NicolasSironi
Copy link

NicolasSironi commented Jan 14, 2020 via email

@saberraz saberraz changed the title The plugin cannot connect to the server in macos 10.13 The plugin cannot connect to the server Jan 17, 2020
@saberraz
Copy link
Contributor Author

Same issue has been reported in Windows too. Here is the debug from First Aid:
image

@PachKosti
Copy link

PachKosti commented Jan 20, 2020

@NicolasSironi
May You please execute this commands in QGIS's python console?
import requests
requests.get(url = "https://public.cloudmergin.com/")

and write here you response from server

@saberraz
Copy link
Contributor Author

image
image

@NicolasSironi
Copy link

NicolasSironi commented Jan 21, 2020 via email

@electrictibet
Copy link

I have the same problem with:

Plug-in 2020.01
QGIS 3.10.2
Mac OS X 10.14.6

It just won't connect.
Screen Shot 2020-01-22 at 8 23 23 AM

@PeterPetrik
Copy link
Contributor

Hi @electrictibet can you please run these commands in the qgis python's console and send here output?

import requests
requests.get(url = "https://public.cloudmergin.com/")
requests.get(url = "http://public.cloudmergin.com/")

you should get response <Response [200]>

@PeterPetrik
Copy link
Contributor

Also @electrictibet, when have you registered to Mergin? Have you been able to login before?

@electrictibet
Copy link

I have registered. I do get that response.
Screen Shot 2020-01-22 at 8 41 39 AM

Screen Shot 2020-01-22 at 8 37 57 AM

@electrictibet
Copy link

Hmmm. That means that its on my end?

@PeterPetrik
Copy link
Contributor

@electrictibet can you show me output of this? (replace your password, and do not post it here)

import Mergin.mergin.client as c
mc = c.MerginClient("https://public.cloudmergin.com/")
mc.is_server_compatible()
mc.login("electrictibet",  "PLEASEREPLACEWITHYOURPASSWORD")

you should get True for server compatibility and token for login similar to
{'expire': '2020-01-23T05:12:58.256220+00:00', 'token': '.eJx...K3A'}

@PeterPetrik PeterPetrik self-assigned this Jan 23, 2020
@timlinux
Copy link

@PeterPetrik so we tested on @carina1000 ´s machine and get a similar error:

mc.is_server_compatible()
Traceback (most recent call last):
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/http/client.py", line 1392, in connect
    server_hostname=server_hostname)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/ssl.py", line 853, in _create
    self.do_handshake()
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/ssl.py", line 1117, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "/Users/carinat/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 613, in is_server_compatible
    resp = self.get("/ping")
  File "/Users/carinat/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 597, in get
    return self._do_request(request)
  File "/Users/carinat/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 585, in _do_request
    return self.opener.open(request)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/urllib/request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
´´`

Note that the error occurs on the is_server_compatible line

@PeterPetrik
Copy link
Contributor

@timlinux and @carina1000 can you also try

import requests
requests.get(url = "https://public.cloudmergin.com/")

@PeterPetrik
Copy link
Contributor

Workaround, install brew and

brew install openssl@1.1

I will try to fix it in the official Mac package for the next release, and we may try to do workaround for mergin-plugin

@saberraz
Copy link
Contributor Author

@NicolasSironi @electrictibet could you try with the latest version of the plugin (2020.2)?

@NicolasSironi
Copy link

NicolasSironi commented Feb 25, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants