#58381 closed defect (wontfix)

wireshark3: Could not load the Qt platform plugin "cocoa"

Reported by: ra1nb0w Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cjones051073 (Chris Jones)
Port: wireshark3

Description

has anyone seen the following error with wireshark3 @3.0.1_1+cares+geoip+gnutls+kerberos5+libgcrypt+libsmi+python37+qt5+zlib?

qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: cocoa.

[1]    92980 abort      /Applications/MacPorts/Wireshark.app/Contents/MacOS/Wireshark

otool reports that all libraries are linked.

System:
macOS 10.14.4 18E226
Xcode 10.2.1 10E1001

thank you

Change History (16)

comment:1 Changed 18 months ago by jmroot (Joshua Root)

Cc: cjones051073 added
Port: wireshark3 added

comment:2 Changed 18 months ago by cjones051073 (Chris Jones)

I do not see it, but I also am not using all those variants. Could you start by removing your currently build, then reinstall with default variants.

sudo port uninstall wireshark3
sudo port sync
sudo port upgrade outdated
sudo port install wireshark3

Then report what you get.

Last edited 18 months ago by cjones051073 (Chris Jones) (previous) (diff)

comment:3 Changed 18 months ago by ra1nb0w

Already done several times. With and without ccache.
I also reverted 52d63c0d74622e1564ac52401e8c6c47912b2538 commit but without any success (by the way, variant qt5 should be consolidated at first sight).
I don't touch the variants in wireshark3 and the port declare

default_variants +zlib +libsmi +gnutls +libgcrypt +cares +geoip +kerberos5
default_variants-append +qt5
default_variants-append +python37

comment:4 Changed 18 months ago by ghosthound

Can you add a list of the qt5 ports you have installed? I'm not having this problem w/ wireshark3 and the qt5 ports it requires.

comment:5 Changed 18 months ago by ra1nb0w

  qt5-qtbase @5.12.3_0+openssl (active)
  qt5-qtcreator @4.8.2_0 (active)
  qt5-qtdeclarative @5.12.3_0 (active)
  qt5-qtgraphicaleffects @5.12.3_0 (active)
  qt5-qtimageformats @5.12.3_0 (active)
  qt5-qtlocation @5.12.3_0 (active)
  qt5-qtmacextras @5.12.3_0 (active)
  qt5-qtmultimedia @5.12.3_0 (active)
  qt5-qtquickcontrols @5.12.3_0 (active)
  qt5-qtquickcontrols2 @5.12.3_0 (active)
  qt5-qtscript @5.12.3_0 (active)
  qt5-qtserialport @5.12.3_0 (active)
  qt5-qtsvg @5.12.3_0 (active)
  qt5-qttools @5.12.3_0 (active)
  qt5-qttranslations @5.12.3_0 (active)
  qt5-qtwebchannel @5.12.3_0 (active)
  qt5-qtwebengine @5.12.3_0 (active)
  qt5-qtwebsockets @5.12.3_0 (active)
  qt5-sqlite-plugin @5.12.3_0 (active)

comment:6 Changed 18 months ago by cjones051073 (Chris Jones)

I also cannot reproduce your problem. Works fine for me, on a number of machines and OS versions.

My best guess is something is up with your qt installation. I would perhaps suggest removing all qt5* ports, and dependents, and reinstall, to see if that helps.

comment:7 Changed 18 months ago by kencu (Ken)

Googling that error brings up reams of pages of people with similar errors in all kinds of different qt5 programs, so it's out there, eg :

<https://bugs.dolphin-emu.org/issues/11332>

comment:8 Changed 18 months ago by cjones051073 (Chris Jones)

Thanks. The report above has in it

Might have something to do that I provided Qt5_DIR=/usr/local/Cellar/qt/5.12.2 upon running CMake?

Do you by chance do anything similar ?

comment:9 Changed 18 months ago by cjones051073 (Chris Jones)

Another maybe interesting discussion

https://forum.qt.io/topic/98816/qt-could-not-find-the-platform-plugin-cocoa

Ra1nb0w, you are going to have to debug this yourself. Try looking at some of the discussions googling the error gives you to see if you can find any hints as to what is wrong in your case...

Last edited 18 months ago by cjones051073 (Chris Jones) (previous) (diff)

comment:10 Changed 18 months ago by ra1nb0w

I don't have homebrew. Anyway, thanks to everyone I try to investigate myself seen that it is only happen on my machine.
This ticket can be closed.

comment:11 in reply to:  10 Changed 18 months ago by cjones051073 (Chris Jones)

Replying to ra1nb0w:

I don't have homebrew. Anyway, thanks to everyone I try to investigate myself seen that it is only happen on my machine.
This ticket can be closed.

I wasn't suggesting you had home-brew installed. More if you had any QT env vars set in your login scripts, or similar.

comment:12 Changed 18 months ago by ra1nb0w

Removed /Applications/MacPorts/Wireshark.app/Contents/{Frameworks,PlugIns,Resources/qt.conf,Resources/share} and it works. They are useless because are in /opt/local and linked to that.

/Applications/MacPorts/Wireshark.app/Contents/MacOS/Wireshark:
	/opt/local/lib/libwscodecs.2.dylib (compatibility version 2.0.0, current version 2.0.0)
	/opt/local/lib/libwireshark.12.dylib (compatibility version 12.0.0, current version 12.0.1)
	/opt/local/libexec/qt5/lib/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility version 5.12.0, current version 5.12.3)
	/opt/local/libexec/qt5/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.12.0, current version 5.12.3)
	/opt/local/libexec/qt5/lib/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.12.0, current version 5.12.3)
	/opt/local/libexec/qt5/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.12.0, current version 5.12.3)
	/opt/local/libexec/qt5/lib/QtMacExtras.framework/Versions/5/QtMacExtras (compatibility version 5.12.0, current version 5.12.3)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 50.1.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1671.40.118)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1570.15.0)
	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 963.250.1)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
	/opt/local/lib/libwiretap.9.dylib (compatibility version 9.0.0, current version 9.0.1)
	/opt/local/lib/libwsutil.10.dylib (compatibility version 10.0.0, current version 10.0.0)
	/opt/local/lib/libgmodule-2.0.0.dylib (compatibility version 5801.0.0, current version 5801.3.0)
	/opt/local/lib/libpcap.A.dylib (compatibility version 1.0.0, current version 1.9.0)
	/opt/local/lib/libgcrypt.20.dylib (compatibility version 23.0.0, current version 23.4.0)
	/opt/local/lib/libgpg-error.0.dylib (compatibility version 28.0.0, current version 28.0.0)
	/opt/local/lib/libgnutls.30.dylib (compatibility version 54.0.0, current version 54.2.0)
	/opt/local/lib/libglib-2.0.0.dylib (compatibility version 5801.0.0, current version 5801.3.0)
	/opt/local/libexec/qt5/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.12.0, current version 5.12.3)
	/opt/local/libexec/qt5/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.12.0, current version 5.12.3)
	/opt/local/libexec/qt5/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.12.0, current version 5.12.3)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

For what I understood about /Applications/MacPorts the .app contains the binary, icons, Info.plist and generally nothing else because they are on /opt/local.

comment:13 Changed 18 months ago by cjones051073 (Chris Jones)

There is something funny going on with your installation, as I do not have a number of the files you mention above.

Titan /Applications/MacPorts/Wireshark.app/Contents > ls
Info.plist	MacOS		PkgInfo		PlugIns		Resources
Titan /Applications/MacPorts/Wireshark.app/Contents > ls *
Info.plist	PkgInfo

MacOS:
Wireshark	captype		dumpcap		extcap		mergecap	rawshark	sharkd		tshark
capinfos	dftest		editcap		idl2wrs		randpkt		reordercap	text2pcap

PlugIns:
wireshark

Resources:
Wireshark.icns		Wiresharkdoc.icns	share

comment:14 Changed 18 months ago by cjones051073 (Chris Jones)

you should try the following, uninstall wireshark3, then see what if anything is left over in /Applications/MacPorts/Wireshark.app ?

My best guess is you have(or had) some files there not from this port, left over from something else, causing problems.

Last edited 18 months ago by cjones051073 (Chris Jones) (previous) (diff)

comment:15 Changed 18 months ago by ra1nb0w

Thank you for the feedback. I was convinced that I did rm -rf; now it works. Anyway, PlugIns/wireshark and Resources/share have many duplicated files but I checked and they are needed there.

Sorry for the noise! (and such stupid mistake)

comment:16 Changed 18 months ago by cjones051073 (Chris Jones)

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.