kaiserdj / Darkorbit-client

Open source darkorbit client (cross-platform and with better performance)
GNU Affero General Public License v3.0
95 stars 23 forks source link

Can't load plug-in #11

Closed VerbeekJordy closed 3 years ago

VerbeekJordy commented 3 years ago

When I open Hangar or when I click start I get the message that it can't load the plugin. I'm using Mac OS.

Schermafbeelding 2021-02-27 om 18 06 22
kaiserdj commented 3 years ago

Do you have the latest version of the client?

enesbcs commented 3 years ago

Its the same on Ubuntu Linux: can not load plugin. I guess that flash player is not available or included electron version is not capable to load it:

https://stackoverflow.com/questions/58017490/how-can-i-make-flash-work-in-my-electron-application

enesbcs commented 3 years ago

Issue is duplicate of https://github.com/kaiserdj/Darkorbit-client/issues/10

enesbcs commented 3 years ago

I've tried with Ubuntu Linux and as i see in core.js "this.ppapi_flash_path" var contains "Darkorbit-client/node_modules/electron/dist/resources/flash/libpepflashplayer.so" but file is located in "Darkorbit-client/flash/libpepflashplayer.so". I've created Darkorbit-client/node_modules/electron/dist/resources/flash/ directory and copied libpepflashplayer.so file inside it, then Darkorbit Hangar and Game window opens fine.

celikfatih commented 3 years ago

The problem was resolved for me when I did the following for Linux Ubuntu 18.04. The following line in core.js: this.ppapi_flash_path = path.join(process.resourcesPath, './flash/libpepflashplayer.so'); i changed it with this: this.ppapi_flash_path = path.join(app.getAppPath(), './flash/libpepflashplayer.so');

kaiserdj commented 3 years ago

Are you using the compiled version (appimage) or have you cloned the repository? @celikfatih @enesbcs And what version are you using?

enesbcs commented 3 years ago

And what version are you using?

Cloned version, the latest. https://github.com/kaiserdj/Darkorbit-client/blob/main/core.js

@celikfatih has a point as win32 and darwin port already uses "app.getAppPath()" only the linux port uses "process.resourcesPath" which seems to be incorrect.

kaiserdj commented 3 years ago

The problem in linux is that the format I use is appimage, which generates a temporary folder where it extracts the entire program, so I need the variable "process.resourcesPath" Example of running result of appimage: image But when you try to run from the project itself it returns the default environment that electron uses to run the projects Project execution example: image Which does not exist

The solution I can think of is to check if the process.resourcesPath is in the tmp folder and if not, use app.getAppPath () this.ppapi_flash_path = path.join(process.resourcesPath.split("/")[1] === "tmp" ? process.resourcesPath : app.getAppPath(), './flash/libpepflashplayer.so');

I have checked it in Ubuntu, but not in the other distributions

kaiserdj commented 3 years ago

Also this is for linux users(@enesbcs , @celikfatih y https://github.com/kaiserdj/Darkorbit-client/issues/10), but this issue is from a mac user, so the problem is not solved until you give more information

kaiserdj commented 3 years ago

This https://github.com/kaiserdj/Darkorbit-client/commit/667b0938ebde6b5eb785465fd7f048009606a1b3 may fix @VerbeekJordy's error, but I don't have enough information to know what error you have.

kaiserdj commented 3 years ago

I close the issue for not receiving a reply, if they have problems again. Reopen this issue or create a new one