Comments (5)
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.
en, I have moved the native app to my home directory. But I still face the same error.
I also done some experiment:
- after type
./install.sh
, I typeps -ef | grep main*
, then I did not foundmain.rb
running. - I start the native app manually, by typing
./main.rb
under app directory. Then I can findmain.rb
running while typeps -ef | grep main*
. - after 2, I can found
app.log
undertmp
, 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.
above log's App exit
is coursed by typing ctrl+c
to terminate main.rb
, which is reasonable.
from maoxian-web-clipper.
en, I have dig out more.
- 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
- 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. - However, the ID in that json file is not the same with URL's.
- And the ID comes from
manifest.json
- So I changed the ID in
manifest.json
, and reinstall maoxian native app. - At this time, the report changes:
「本地程序」当前不可用
错误信息: NativeApp: DisconnectErr:No such native application maoxian_web_clipper_native
可能是由于你的「本地程序」还没有安装或者安装未成功导致的 ([查看如何安装](go.page:native-app))
from maoxian-web-clipper.
- 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 sidetmp/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)
- Discuss about converting block links to markdown HOT 8
- code not shownup right way HOT 3
- 能否借鉴singlefile的懒加载(lazyload, lazy load, 延迟加载)功能 HOT 3
- 使用浏览器书签来保留剪辑历史记录 / use browser bookmarks to keep clipping history HOT 1
- Chrome 118.0.5993.71版本用不了吗? HOT 1
- 本插件与IDM下载浏览器插件冲突(chrome浏览器) HOT 2
- 使用追加裁剪信息到内容尾部时,剪裁部分和追加信息部分拼接尺寸大小不一致,影响观感 HOT 1
- 请问如何实现“自由选区”,感谢 HOT 2
- NativeApp 没有启动成功 HOT 4
- 有没有对接其他笔记软件的计划 HOT 1
- 无法裁剪某些网页, 提示 r is not defined HOT 1
- 无法打开本地保存的页面 HOT 2
- 52pojie的贴子源码保存为Markdown时错误 HOT 1
- 某些网站剪藏时报错String contains an invalid character HOT 1
- chatgpt不能读取整个网页 HOT 9
- 浏览器显示:该扩展程序未列在 Chrome 应用商店中,并可能是在您不知情的情况下添加的 HOT 1
- 拖入Chrome浏览器,点击安装扩展之后无法点击打开 HOT 2
- 某些公式无法抓取的问题 HOT 3
- 用 MaoXian 网摘保存网络文章到 Notion HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maoxian-web-clipper.