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

Path error GRASS plugin QGIS 3.14 #38595

Open
Proutbill opened this issue Sep 4, 2020 · 32 comments · Fixed by #38840
Open

Path error GRASS plugin QGIS 3.14 #38595

Proutbill opened this issue Sep 4, 2020 · 32 comments · Fixed by #38840
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS macOS

Comments

@Proutbill
Copy link

MAC OS 10.15.4 and QGIS 3.14.
Grass Plugin couldn't be found: original path was tied to QGIS 3.12 instead of 3.14>>
/Applications/QGIS3.12.app/Contents/Resources/grass7
Good path is /Applications/QGIS3.14.app/Contents/Resources/grass7

@Proutbill Proutbill added the Won't fix By design, or won't be fixed for some other reason label Sep 4, 2020
@gioman gioman added Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS macOS and removed Won't fix By design, or won't be fixed for some other reason labels Sep 4, 2020
@gioman
Copy link
Contributor

gioman commented Sep 4, 2020

@Proutbill is this a suggestion for a patch? a bug report? else?

@Proutbill
Copy link
Author

Proutbill commented Sep 4, 2020 via email

@gioman
Copy link
Contributor

gioman commented Sep 4, 2020

@Proutbill what installer have you used?

@Proutbill
Copy link
Author

Proutbill commented Sep 4, 2020 via email

@gioman
Copy link
Contributor

gioman commented Sep 4, 2020

@PeterPetrik ping(?).

@PeterPetrik
Copy link
Contributor

can you try with clean profile? GRASS path can be saved in your preferences. also please try grass from nightly2 builds https://qgis.org/downloads/macos/nightly2/

@gioman gioman added the Feedback Waiting on the submitter for answers label Sep 4, 2020
@Proutbill
Copy link
Author

Proutbill commented Sep 4, 2020 via email

@gioman
Copy link
Contributor

gioman commented Sep 4, 2020

Sorry, my computer skills are limited

settings > user profiles > new profile

@DelazJ
Copy link
Contributor

DelazJ commented Sep 4, 2020

From the one-click installer, I had 3.10 installed (and next to it) 3.14. My default profile for 3.14 is showing 3.10 in the "Grass7 path" and "doc path". A new user profile shows 3.14 paths.
I guess paths are not updated while installing a new version.

@PeterPetrik
Copy link
Contributor

I think paths are stored in user profile, and in new profile they are guessed from the installation dir. So I do not think this is bug as such since you can set your GRASS dir to custom one .?.

@gioman
Copy link
Contributor

gioman commented Sep 4, 2020

I think paths are stored in user profile, and in new profile they are guessed from the installation dir. So I do not think this is bug as such since you can set your GRASS dir to custom one .?.

it's tricky we had similar problems in the past with Processing and SAGA, GRASS paths stored at user level and not changed when installing newer versions... not sure how to classify this.

@PeterPetrik PeterPetrik removed the Feedback Waiting on the submitter for answers label Sep 17, 2020
@PeterPetrik PeterPetrik self-assigned this Sep 17, 2020
@PeterPetrik
Copy link
Contributor

workaround: go to Menu->Settings->Options->Processing(left)->Providers->Grass->set GRASS7 folder to /Application/QGIS.app/Contents/MacOS/grass78 or where you installation points to

@PeterPetrik PeterPetrik changed the title Path error GRASS plugin QGIS 3.14 - solved Path error GRASS plugin QGIS 3.14 Sep 17, 2020
@PeterPetrik
Copy link
Contributor

Interestingly GRASS_FOLDER is only and only used on MacOS. I imagine it is some workaround for previous issues.

@dkav
Copy link

dkav commented Sep 22, 2020

Still not working on qgis_nightly2_master_20200922_013400. Here is the error:

GRASS init error : GRASS was not found in 'INVALID/S/qgis-deps-0.5.4/stage/grass78' (GISBASE), provider and plugin will not work.

@PeterPetrik PeterPetrik reopened this Sep 22, 2020
@PeterPetrik
Copy link
Contributor

PeterPetrik commented Sep 22, 2020

@dkav is this clean profile? also any change you have GISBASE in your environment somewhere (in terminal write env | grep GISBASE)? Can you upen QGIS Python console and type

import os
os.getenv('GISBASE')

@dkav
Copy link

dkav commented Sep 22, 2020

Yes, clean profile. No GISBASE environmental settings via shell. Similarly, no value with getenv.

@PeterPetrik
Copy link
Contributor

@dkav but GRASS in processing toolbox is present, only GRASS plugin is not ready, right?

can you try to run ln -s ./grass78 /Applications/QGIS.app/Contents/MacOS/grass and let me know if it works as expected? i will fix in the packager if that works.

@dkav
Copy link

dkav commented Sep 22, 2020

Processing toolbox is crashing the application. See #38960.

@PeterPetrik
Copy link
Contributor

What MacOS version do you have?

@Proutbill
Copy link
Author

Proutbill commented Sep 22, 2020 via email

@dkav
Copy link

dkav commented Sep 22, 2020

MacOS - 10.15.6. Creating the symbolic link resolved the issue.

Not sure if this is related or if I am conflating other issues, but I got the following error when loading a GRASS raster while testing. (Vector layer loaded.)

2020-09-22T13:13:54 CRITICAL Invalid Layer : GRASS provider Cannot get projection
Cannot find module /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
GRASS provider Cannot get raster extent : Cannot find module /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
GRASS provider Cannot get map info
Cannot find module /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
Raster layer Provider is not valid (provider: grassraster, URI: /Users/dkav/Downloads/grass/test/PERMANENT/cellhd/test

Which may be related to QGIS on startup complaining about missing projdb (or maybe this has nothing to do with projections). From Terminal:

proj_create_from_database: Cannot find proj.db
proj_create_from_database: Cannot find proj.db
proj_get_authorities_from_database: Cannot find proj.db
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
proj_as_wkt: Cannot find proj.db
proj_create_from_wkt: Cannot find proj.db
proj_identify: Cannot find proj.db
proj_as_wkt: Cannot find proj.db

@PeterPetrik
Copy link
Contributor

what is qgis.g.info7 ? I cannot find anything with such name in qgis/QGIS not OSGeo/GRASS repositories?

for proj issue, can you follow #38919?

import os
os.getenv('PROJ_LIB')

and check if such folder exists with proj.db?

@PeterPetrik
Copy link
Contributor

Mac os 10.15.4 I'm having another problem. I fixed the path so I can open grass and create a new mapset, but I can't import any layer in the mapset using the browser.

in Plugins>Grass>Open/New Mapset
Screenshot 2020-09-22 at 23 12 25

@dkav
Copy link

dkav commented Sep 22, 2020

Re qgis.g.info7 - I have no idea. I found a reference to it on #31397 and here QGIS/ms-windows/osgeo4w/package.cmd

PeterPetrik added a commit to qgis/QGIS-Mac-Packager that referenced this issue Sep 23, 2020
@PeterPetrik PeterPetrik added the Feedback Waiting on the submitter for answers label Sep 24, 2020
@dkav
Copy link

dkav commented Sep 24, 2020

Re qgis.g.info7, on the qgis_nightly2_master_20200923_133843.dmg build the error reported when loading a raster via the Browser panel is:

CRITICAL Invalid Layer : GRASS provider Cannot get projection
Cannot run module
command: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info info=proj
stdout:
stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib
Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
Reason: image not found

GRASS provider Cannot get raster extent : Cannot run module
command: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info info=size rast=test2@PERMANENT
stdout:
stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib
Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
Reason: image not found

GRASS provider Cannot get map info
Cannot run module
command: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info info=info rast=test2@PERMANENT
stdout:
stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib
Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
Reason: image not found

Raster layer Provider is not valid (provider: grassraster, URI: /Users/dkav/Downloads/grass/test/PERMANENT/cellhd/test2

@PeterPetrik
Copy link
Contributor

@dkav can you write me steps how to reproduce it?

@dkav
Copy link

dkav commented Sep 24, 2020

I just double clicked on a GRASS raster in the browser window. You will need a GRASS database setup with raster to replicate. (Same error on 3.14.)

sr

@dkav
Copy link

dkav commented Sep 24, 2020

Just to double check, I imported a different raster into a GRASS DB and the same problem arose. I was able to open both rasters in the GRASS GUI (on Windows).

@drf5n
Copy link

drf5n commented Dec 8, 2020

@dkav but GRASS in processing toolbox is present, only GRASS plugin is not ready, right?

can you try to run ln -s ./grass78 /Applications/QGIS.app/Contents/MacOS/grass and let me know if it works as expected? i will fix in the packager if that works.

In what directory do you intend this symbolic link to be made? In my QGIS 3.16.0 install I have these:

$ ls -lad /Applications/QGIS.app/Contents/Resources/gr*
drwxr-xr-x@  6 drf  admin  192 Oct 26 11:21 /Applications/QGIS.app/Contents/Resources/grass
drwxr-xr-x@ 23 drf  admin  736 Oct 27 15:30 /Applications/QGIS.app/Contents/Resources/grass78

...and I'm getting the "stderr: dyld: Library not loaded: @rpath/libgrass_gis.7.8.dylib" error as in @dkav's comment: #38595 (comment).

@dkav
Copy link

dkav commented Dec 9, 2020

In addition to the raster issue, the following error is logged in MacOS Crash Reports when opening (successfully) a GRASS vector layer.

Process:               qgis.g.info7 [51744]
Path:                  /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
Identifier:            qgis.g.info7
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        QGIS [51729]
Responsible:           QGIS [51729]
User ID:               501

Date/Time:             2020-12-08 23:52:01.645 -0800
OS Version:            Mac OS X 10.15.7 (19H15)
Report Version:        12
Anonymous UUID:        94FB247C-3070-FF2F-E526-5D1B9C3DF18B

Sleep/Wake UUID:       625DC8C2-F916-4995-B582-3C792052DC06

Time Awake Since Boot: 360000 seconds
Time Since Wake:       4200 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: @rpath/libgrass_gis.7.8.dylib
  Referenced from: /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
  Reason: image not found

Binary Images:
       0x10c8ae000 -        0x10c8b1fff +qgis.g.info7 (0) <56669D8F-0451-3D4B-9A96-49235B9BD129> /Applications/QGIS.app/Contents/MacOS/lib/qgis/grass/modules/qgis.g.info7
       0x1159d5000 -        0x115a66f47  dyld (750.6) <1D318D60-C9B0-3511-BE9C-82AFD2EF930D> /usr/lib/dyld

@dkav
Copy link

dkav commented Dec 10, 2020

This may confuse matters but the errors reference in my most recent comment and my earlier comment are independent of the GRASS plugin. The errors are reported if the GRASS plugin is enabled or disabled.

@github-actions
Copy link

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Dec 25, 2020
@gioman gioman removed Feedback Waiting on the submitter for answers stale Uh oh! Seems this work is abandoned, and the PR is about to close. labels Dec 27, 2020
@PeterPetrik PeterPetrik removed their assignment Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants