Giter Club home page Giter Club logo

Comments (5)

mika-cn avatar mika-cn commented on August 17, 2024

I saw your native application is installed under /opt. Do you intend to installed it there? This Native Application is better be installed under your home directory to avoid permission denied problems.

Because the unusual installation location. I can think of two possibilities that will cause this error, list below:

  • you extracted the native application under /opt, and did the installation then move, rename, or remove the native application. This will cause the browser can't find the target native application.
  • you extracted the native application under /opt, and the browser tried to execute the native application, but the native application wantted to create a logger file in path /opt/maoxian-firefox/tmp/app.log.which got permission denied.

how can I solve that?

Install it under your home directory.

from maoxian-web-clipper.

wieniawski-lai avatar wieniawski-lai commented on August 17, 2024

en, I have moved the native app to my home directory. But I still face the same error.

I also done some experiment:

  1. after type ./install.sh, I type ps -ef | grep main*, then I did not found main.rb running.
  2. I start the native app manually, by typing ./main.rb under app directory. Then I can find main.rb running while type ps -ef | grep main*.
  3. after 2, I can found app.log under tmp, which is
# Logfile created on 2023-08-28 16:05:13 +0800 by logger.rb/v1.4.3
I, [2023-08-28T16:05:13.214842 #62915]  INFO -- : App Start
I, [2023-08-28T16:05:13.214865 #62915]  INFO -- : Version: 0.2.11
I, [2023-08-28T16:05:13.214873 #62915]  INFO -- : Ruby Version: 3.0.2
I, [2023-08-28T16:05:13.214880 #62915]  INFO -- : Msg handler: default
I, [2023-08-28T16:05:13.214886 #62915]  INFO -- : Encoding: 
I, [2023-08-28T16:05:13.214892 #62915]  INFO -- :   Script => UTF-8
I, [2023-08-28T16:05:13.214899 #62915]  INFO -- :   Locale => UTF-8
I, [2023-08-28T16:05:13.214905 #62915]  INFO -- :   Filesystem => UTF-8
I, [2023-08-28T16:05:13.214911 #62915]  INFO -- :   Default external => UTF-8
I, [2023-08-28T16:05:13.214918 #62915]  INFO -- :   Default internal => nil
I, [2023-08-28T16:05:39.950020 #62915]  INFO -- : App exit: 62915
I, [2023-08-28T16:06:11.392715 #62942]  INFO -- : App Start
I, [2023-08-28T16:06:11.392760 #62942]  INFO -- : Version: 0.2.11
I, [2023-08-28T16:06:11.392769 #62942]  INFO -- : Ruby Version: 3.0.2
I, [2023-08-28T16:06:11.392776 #62942]  INFO -- : Msg handler: default
I, [2023-08-28T16:06:11.392782 #62942]  INFO -- : Encoding: 
I, [2023-08-28T16:06:11.392788 #62942]  INFO -- :   Script => UTF-8
I, [2023-08-28T16:06:11.392795 #62942]  INFO -- :   Locale => UTF-8
I, [2023-08-28T16:06:11.392802 #62942]  INFO -- :   Filesystem => UTF-8
I, [2023-08-28T16:06:11.392808 #62942]  INFO -- :   Default external => UTF-8
I, [2023-08-28T16:06:11.392814 #62942]  INFO -- :   Default internal => nil
I, [2023-08-28T16:07:14.505163 #62942]  INFO -- : App exit: 62942
I, [2023-08-28T16:08:20.196016 #63060]  INFO -- : App Start
I, [2023-08-28T16:08:20.196054 #63060]  INFO -- : Version: 0.2.11
I, [2023-08-28T16:08:20.196063 #63060]  INFO -- : Ruby Version: 3.0.2
I, [2023-08-28T16:08:20.196070 #63060]  INFO -- : Msg handler: default
I, [2023-08-28T16:08:20.196076 #63060]  INFO -- : Encoding: 
I, [2023-08-28T16:08:20.196083 #63060]  INFO -- :   Script => UTF-8
I, [2023-08-28T16:08:20.196089 #63060]  INFO -- :   Locale => UTF-8
I, [2023-08-28T16:08:20.196095 #63060]  INFO -- :   Filesystem => UTF-8
I, [2023-08-28T16:08:20.196102 #63060]  INFO -- :   Default external => UTF-8
I, [2023-08-28T16:08:20.196108 #63060]  INFO -- :   Default internal => nil

However, I still face error in firefox extension:

「本地程序」当前不可用
错误信息: NativeApp: DisconnectErr:An unexpected error occurred
可能是由于你的「本地程序」还没有安装或者安装未成功导致的 ([查看如何安装](go.page:native-app))

from maoxian-web-clipper.

wieniawski-lai avatar wieniawski-lai commented on August 17, 2024

above log's App exit is coursed by typing ctrl+c to terminate main.rb, which is reasonable.

from maoxian-web-clipper.

wieniawski-lai avatar wieniawski-lai commented on August 17, 2024

en, I have dig out more.

  1. I notice that while openning maoxian's setting in firefox, the URL is moz-extension://9477edee-386e-4614-b601-c288832a838c/pages/setting.html#setting-storage
  2. I guess 9477edee-386e-4614-b601-c288832a838c is the extension's ID, which should be appeared in $HOME/.mozilla/native-messaging-hosts/maoxian_web_clipper_native.json file.
  3. However, the ID in that json file is not the same with URL's.
  4. And the ID comes from manifest.json
  5. So I changed the ID in manifest.json, and reinstall maoxian native app.
  6. At this time, the report changes:
「本地程序」当前不可用
错误信息: NativeApp: DisconnectErr:No such native application maoxian_web_clipper_native
可能是由于你的「本地程序」还没有安装或者安装未成功导致的 ([查看如何安装](go.page:native-app))

from maoxian-web-clipper.

mika-cn avatar mika-cn commented on August 17, 2024
  1. after type ./install.sh, I type ps -ef | grep main*, then I did not found main.rb running.

This is totally normal, because the installation only copy the manifest.json to $HOME/.mozilla/native-messaging-hosts/ it did not start the native app. The native app is started by Firefox.

This also means manually start the native app didn't work. Native Applications should only be started by browsers, so that they can communicate to each other.


And this id {7deb155c-e51d-4bbb-a904-37dec499340c} is the right one, The id you copied from address bar is just a Internal UUID (you could find this different in url: about:debugging#/runtime/this-firefox).


From the information you provided so far, you have installed the native app. but Firefox failed to start it.

Here's how to further debug it:

  • remove the logger file first: rm tmp/app.log
  • close your firefox and start it from command line like this: /usr/bin/firefox. So you can see the loggers that printted by firefox.
  • Go to settings page of MaoXian > Native App , so that Firefox will try to start up the native app of MaoXian.

After these operations do this:

  • Check if the existence of logger file: tmp/app.log. If it's exist, then Firefox did try to run it (main.rb). All you need to do is figure out what's wrong in side tmp/app.log

  • If you couldn't find the logger file, then see the loggers that printted by Firefox. This means Firefox didn't even run the main.rb file. Something is wrong about finding the ruby, finding the main.rb or file permission is not right.

from maoxian-web-clipper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.