Closed
Bug 923412
Opened 11 years ago
Closed 11 years ago
install packaged app from zamboni server failed(manifest_parse_error / download failed)
Categories
(Marketplace Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: cutesecond, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 Steps to reproduce: Test 1: 1. I install zamboni / fireplace /nginx, and then I submit a packaged to this zamboni server 2. I also review this packaged app. 3. goto marketplace --> chose the packaged app --> install Test2. 1. marketplace --> Developers --> My Submissions --> this app --> Manage Status & Versions in the field (Packaged Versions) --> download Actual results: Test 1: --->fail log (manifest_parse_error) Test 2: [views] Routing /downloads/file/26/yaya-ca-1.0.zip log.js [views] Failed to match route for /downloads/file/26/yaya-ca-1.0.zip Expected results: Test 1: install pass Test 2: download success Could you provide nginx.conf / settings_local_mkt.py? I have followed the example in github, but still have this problem.
Reporter | ||
Updated•11 years ago
|
OS: All → Linux
Hardware: All → x86
Reporter | ||
Comment 1•11 years ago
|
||
environment: commit f16320add5bfd4e29f71291e13a701d837bcfb73 Date: Sun Sep 1 08:55:09 2013 +0000
Updated•11 years ago
|
Product: Boot2Gecko → Marketplace
Version: unspecified → 1.0
Reporter | ||
Comment 2•11 years ago
|
||
Hi Jason, can you give me any comment or document about this question? Thank you :)
Comment 3•11 years ago
|
||
Try adding this to your settings_local_mkt.py file: SERVE_TMP_PATH = True If you're still having problems, please find us on IRC in the #amo channel. Thanks!
Comment 4•11 years ago
|
||
It should also be noted that if you submit a privileged packaged app to your local install, you won't be able to install it because you don't have certs. That's a can of worms in itself. cvan: this might be something we should look to add to the setup docs.
Reporter | ||
Comment 5•11 years ago
|
||
To cvan: From http://zamboni.readthedocs.org/en/latest/topics/install-zamboni/troubleshooting.html I have added it to my settings_local_mkt.py file SERVE_TMP_PATH = True But I still have this problem. To Matt: I have checked the packaged app which I test, it is web type. Thanks :)
Reporter | ||
Comment 6•11 years ago
|
||
Update my test. My server address is 192.168.1.168 I find something strange in the test 2. Test2. 1. marketplace --> Developers --> My Submissions --> this app --> Manage Status & Versions in the field (Packaged Versions) --> download In the page(marketplace --> Developers --> My Submissions --> this app --> Manage Status & Versions in the field (Packaged Versions) --> download), user can see the path is http://192.168.1.168/downloads/file/12/yaya-body-fat-percentage-ca-1.0.zip?src= But I only find the file(yaya-body-fat-percentage-ca-1.0.zip) in zamboni/tmp/addons/13/yaya-body-fat-percentage-ca-1.0.zip Should I add some mapping URL in my settings_local_mkt.py file? Thanks!
Comment 7•11 years ago
|
||
(In reply to cutesecond from comment #6) > Update my test. > > My server address is 192.168.1.168 > > I find something strange in the test 2. > > Test2. > 1. marketplace --> Developers --> My Submissions --> this app --> Manage > Status & Versions > in the field (Packaged Versions) --> download > > In the page(marketplace --> Developers --> My Submissions --> this app --> > Manage Status & Versions > in the field (Packaged Versions) --> download), > user can see the path is > http://192.168.1.168/downloads/file/12/yaya-body-fat-percentage-ca-1.0. > zip?src= > > But I only find the file(yaya-body-fat-percentage-ca-1.0.zip) in > zamboni/tmp/addons/13/yaya-body-fat-percentage-ca-1.0.zip > > Should I add some mapping URL in my settings_local_mkt.py file? > > Thanks! If you look in mkt/downloads/views.py you see it takes the file ID and looks up the file.file_path, which is a property on the File model in apps/files/models.py, which does include the addon ID in the file system path. This looks right to me. You shouldn't need any additional URL mappings. If you could pdb or print what the file path is it might provide a hint as to what's not configured correctly.
Reporter | ||
Comment 8•11 years ago
|
||
Hi Rob Hudson, Thanks for your response! I print 2 logs: 1. mkt/downloads/views.py code: path = file.file_path print '***** in views.py file.file_path = %s' %(file.file_path) log.info('Downloading package: %s from %s' % (webapp.id, path)) return HttpResponseSendFile(request, path, content_type='application/zip',etag=file.hash.split(':')[-1]) log: ***** in views.py file.file_path = /home/yaya/work/zamboni/tmp/addons/13/yaya-body-fat-percentage-ca-1.0.zip [16/Oct/2013 18:05:01] "GET /downloads/file/12/yaya-body-fat-percentage-ca-1.0.zip HTTP/1.0" 200 0 2. mkt/webapps/models.py code: package_path = absolutify( os.path.join(reverse('downloads.file', args=[file_obj.id]),file_obj.filename)) # package_path = " http://192.168.1.168/tmp/addons/13/yaya-body-fat-percentage-ca-1.0.zip" print "===== package_path= %s" % (package_path) log: ===== package_path= http://192.168.1.168/downloads/file/12/yaya-body-fat-percentage-ca-1.0.zip I did another test: I modify package_path(in mkt/webapps/models.py) to "http://192.168.1.168/tmp/addons/13/yaya-body-fat-percentage-ca-1.0.zip". After the modification, we can install the packaged app into B2G desktop client from our marketplace. Thanks.
Reporter | ||
Comment 9•11 years ago
|
||
update. I did two tests: But in test2, the test result is "Content-Length: 0". Should I modify my nginx.conf? Thanks! [Test 1] yayahuang@YayaHuang:~$ curl -I http://192.168.1.168/tmp/addons/13/yaya-body-fat-percentage-ca-1.0.zip HTTP/1.1 200 OK Server: nginx/1.4.1 Date: Fri, 18 Oct 2013 09:03:09 GMT Content-Type: application/zip Content-Length: 133542 Connection: keep-alive X-Content-Security-Policy-Report-Only: policy-uri /services/csp/policy?build= Access-Control-Expose-Headers: API-Filter, API-Status, API-Version Strict-Transport-Security: max-age=2592000 Vary: Accept-Language, Cookie, X-Mobile, User-Agent Last-Modified: Mon, 14 Oct 2013 06:58:23 GMT Access-Control-Allow-Headers: X-HTTP-Method-Override, Content-Type Set-Cookie: lang="en-US\054"; Path=/ [Test 2] yayahuang@YayaHuang:~$ curl -I http://192.168.1.168:80/downloads/file/12/yaya-body-fat-percentage-ca-1.0.zip HTTP/1.1 200 OK Server: nginx/1.4.1 Date: Fri, 18 Oct 2013 09:06:06 GMT Content-Type: application/zip Content-Length: 0 Connection: keep-alive X-Content-Security-Policy-Report-Only: policy-uri /services/csp/policy?build= Access-Control-Expose-Headers: API-Filter, API-Status, API-Version Strict-Transport-Security: max-age=2592000 Vary: Accept-Language, Cookie, X-Mobile, User-Agent ETag: "01c56b839e440180bac1692cb0fe288418daa495c6618be62ac11209edd3bc87" Access-Control-Allow-Headers: X-HTTP-Method-Override, Content-Type X-SENDFILE: /home/yaya/work/zamboni/tmp/signed-apps/13/yaya-body-fat-percentage-ca-1.0.signed.zip Set-Cookie: lang="en-US\054"; Path=/
Comment 10•11 years ago
|
||
I believe that's normal when using X_SENDFILE. You may need to add the X_SENDFILE plugin for nginx? I'm not sure exactly how that works. You can also disable X_SENDFILE locally using `settings.XSENDFILE = False` which should give you a file sent in the response.
Reporter | ||
Comment 11•11 years ago
|
||
I modify my "settings_base.py" (in zamboni/lib) XSENDFILE = False Now, I can install packaged app to B2G desktop client from our marketplace. Thank you very much!!
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•