How to upload towerjs assets to S3? - towerjs

What is the right way to upload production assets to S3 in towerjs?
I have my S3 credentials configured in config/credentials.coffee
Then I try cake assets:publish
and get
/Users/avaranovich/projects/demos/node/firstApp/Cakefile:15
client = knox.createClient(Tower.secrets.s3);
^
TypeError: Cannot read property 's3' of undefined
at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:15:45)
at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
at Object.action (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:9:12)
at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:67:21)
at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
UPDATE: I figured out that the right line in the task assets:upload:s3 should look
client = knox.createClient Tower.config.credentials.s3
But then I get another error
/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112
_console.debug("Uploading to " + Tower.secrets.s3.bucket);
^
TypeError: Cannot read property 's3' of undefined
at Object.Tower.Application.Assets.upload (/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112:51)
at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:16:37)
Seems like Tower.secrets.s3.bucket hardcoded somewhere else.
Thanks,
Andrei

I would hang tight, watch the development branch closely or even start contributing to its requirements as outlined in the Readme: https://github.com/viatropos/tower/tree/development
They're finally at a "feature complete" stage with the development branch and are now working on shoring it up so that bugs are resolved and performance improves.
Be sure to watch daily the quickly changing roadmap: https://github.com/viatropos/tower/blob/master/ROADMAP.md
Moving at a rather impressive rate given the limited number of developers! We need to throw our weight behind this project.

Related

Angular7 + XHook gives ERROR TypeError: Illegal invocation

I have a chrome plugin runnin Xhook which intercepts xhr requests.
This used to work with angular js. Now I am using an Angular 7 application And I am getting an error when I make following request
this.http.get('someurl').subscribe((data: any) => {
});
Which triggers xhr.send(reqBody); in the angular http.js library. The error is on the subscribe part, if I remove this the error is gone.
The error is the following:
core.js:15724 ERROR TypeError: Illegal invocation
at ZoneTask.scheduleTask [as scheduleFn] (zone.js:3238)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask (zone.js:410)
at Object.onScheduleTask (zone.js:301)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask (zone.js:404)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask (zone.js:238)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask (zone.js:261)
at scheduleMacroTaskWithCurrentZone (zone.js:1245)
at zone.js:3276
at _global.<computed>.proto.<computed> [as send] (zone.js:1569)
at Observable._subscribe (http.js:1726)
I am using this library: https://github.com/jpillora/xhook and the error is caused by line 478 facade.send = function(body) https://github.com/jpillora/xhook/blob/gh-pages/dist/xhook.js
I am thinking that: either angular tries to run the overridden function but something is not accessible because of zone.js, or I am missing certain properties, function in the object that overrides xhr?
If anyone has any information or solution on the subject that would be dearly appreciated.

polymer init: Trying to copy from a source that does not exist

I am trying to follow this simple guide https://www.polymer-project.org/3.0/docs/tools/create-element-polymer-cli
I pasted bellow the whole exception:
C:\dev\polymer2\sample\my-el>polymer init
'uname' is not recognized as an internal or external command,
operable program or batch file.
? Which starter template would you like to use? polymer-3-element
info: [init] Running template polymer-3-element...
? Element name my-el
? Brief description of the element test
error: [cli.main] Uncaught exception: AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist
: C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\templates\element\polymer-3.x\.gitignore
error: [cli.main] AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\myuser\
AppData\Roaming\npm\node_modules\polymer-cli\templates\element\polymer-3.x\.gitignore
at EditionInterface.exports.copy (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\mem-fs
-editor\lib\actions\copy.js:47:3)
at EditionInterface.module.exports [as copyTpl] (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node
_modules\mem-fs-editor\lib\actions\copy-tpl.js:10:8)
at Polymer3ElementGenerator.writing (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\lib\init\element
\element.js:124:21)
at Object.<anonymous> (C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\yeoman-generator\
lib\index.js:417:23)
at C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\run-async\index.js:25:25
at new Promise (<anonymous>)
at C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\run-async\index.js:24:19
at C:\Users\myuser\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\yeoman-generator\lib\index.js:418:9
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)

Odoo POS receipt error

I'm using Odoo v11 in windows localhost and I'm still beginner.
Recently, i tried to edit posticket and suddenly, the point of sale module stops loading it keep blank page.
I have cleared cache for browser and restart odoo service, it worked.
But, the receipt not showing and error message appears as showing below:
Uncaught TypeError: Cannot read property 'vat_label' of null
http://localhost:8069/point_of_sale/static/src/js/models.js:2121
Traceback:
TypeError: Cannot read property 'vat_label' of null
at child.export_for_printing
(http://localhost:8069/point_of_sale/static/src/js/models.js:2121:44)
at Class.get_receipt_render_env
(http://localhost:8069/point_of_sale/static/src/js/screens.js:1538:28)
at Class.render_receipt
(http://localhost:8069/point_of_sale/static/src/js/screens.js:1616:77)
at Class.show
(http://localhost:8069/point_of_sale/static/src/js/screens.js:1505:14)
at Class.prototype.(anonymous function) [as show]
(http://localhost:8069/web/static/src/js/core/class.js:90:38)
at Class.show_screen
(http://localhost:8069/point_of_sale/static/src/js/gui.js:116:33)
at Class.finalize_validation
(http://localhost:8069/point_of_sale/static/src/js/screens.js:2071:22)
at Class.validate_order [as _super]
(http://localhost:8069/point_of_sale/static/src/js/screens.js:2080:18)
at Class.validate_order
(http://localhost:8069/pos_mercury/static/src/js/pos_mercury.js:687:14)
at Class.validate_order
(http://localhost:8069/web/static/src/js/core/class.js:123:38)
Edit :
I have removed all HTML codes i inserted to posticket, now it only working when i activate developer mode with assets. When deactivate and try generate pos sale receipt it gives this error:
Uncaught TypeError: Cannot read property 'vat_label' of null
http://localhost:4883/web/content/2266-abace1e/point_of_sale.assets.js:197
Traceback:
TypeError: Cannot read property 'vat_label' of null
at child.export_for_printing (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:197:863)
at Class.get_receipt_render_env (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:379:1110)
at Class.render_receipt (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:379:2226)
at Class.show (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:379:409)
at Class.prototype.(anonymous function) [as show]
(http://localhost:4883/web/content/2189-
2963aaa/web.assets_common.js:3816:488)
at Class.show_screen (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:314:48)
at Class.finalize_validation (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:400:1111)
at Class.validate_order [as _super] (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:400:1226)
at Class.validate_order (http://localhost:4883/web/content/2266-
abace1e/point_of_sale.assets.js:448:6)
at Class.validate_order (http://localhost:4883/web/content/2189-
2963aaa/web.assets_common.js:3819:371)
I really appreciate your help and support.
Regards,
It turns out that <t t-esc="widget.pos.company.name"/> in posticket is returning that invalid values from modles.js at vat_label: company.country.vat_label,.
Unfortunately, I have removed those two lines and everything works fine now.
I keep investigating on this and i will keep you updated.
Thanks for your support and assistance.
Regards,
Mhdbtashi
It happened to me last night after I delete country data from my company in the settings page. But when I put my country back to my company set-up. it works again. Not sure if this can help. I'm a non-tech person.
this error is related to the country and the field called Tax IVA name, and your company need established by default some country.

Javascript error while expanding product categories on Prestashop 1.6 backoffice

I have a Prestashop 1.6.1.14 shop and at the backoffice when I'm adding a new product and I try to expand all the categories available to associate with the new product I get this error:
VM837:33 Uncaught TypeError: Cannot read property 'parent' of null
at organizeTree (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:33:32)
at Object.eval [as success] (eval at <anonymous> (jquery-1.11.0.min.js:2), <anonymous>:195:6)
at j (jquery-1.11.0.min.js:2)
at Object.fireWith [as resolveWith] (jquery-1.11.0.min.js:2)
at x (jquery-1.11.0.min.js:4)
at XMLHttpRequest.b (jquery-1.11.0.min.js:4)
Any ideas on how to solve it?
Try to disables non Prestashop modules in
Advanced Preferences > Performances
and refresh your cache, see if issue comes from external plugins

Unhandled rejection Error: Chrome still being created

When I use { insertDefaultUI: false } to create a video I get an "Unhandled rejection Error: Chrome still being created" when trying to cleanup after I'm done with session.disconnect().
Any ideas...?
I'm on the TokBox dev team.
The error is not something you should be concerned with, it's something internal to the SDK.
The bug is that the error is appearing at all. I have created a bug report and this error should disappear in a future release. Until then you can safely ignore it.
Thanks for the report.
I'm having the very same problem when trying to unpublish my publisher
Could you guys provide a solution?
Unhandled rejection Error: Chrome still being created
at Object.chromeMixin.reset (https://static.opentok.com/v2/js/opentok.js:41755:16)
at reset (https://static.opentok.com/v2/js/opentok.js:42837:19)
at Publisher.destroy (https://static.opentok.com/v2/js/opentok.js:43211:7)
at defaultAction (https://static.opentok.com/v2/js/opentok.js:43524:20)
at executeDefaultAction (https://static.opentok.com/v2/js/opentok.js:25584:19)
at Object.api.dispatchEvent (https://static.opentok.com/v2/js/opentok.js:25735:7)
at Publisher.self.dispatchEvent (https://static.opentok.com/v2/js/opentok.js:25427:19)
at Object.streamDestroyed (https://static.opentok.com/v2/js/opentok.js:43527:16)
at Object.unpublishFromSession (https://static.opentok.com/v2/js/opentok.js:43507:16)
at Session.unpublish (https://static.opentok.com/v2/js/opentok.js:47031:19)
at Object.me.stop (https://x/rt.js:498:17)
at b.$scope.callBreak (https://x/ler.js:16:24)
at fn (eval at compile (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:239:266), <anonymous>:4:165)
From previous event:
at createChromeMixin (https://static.opentok.com/v2/js/opentok.js:41672:21)
at new Publisher (https://static.opentok.com/v2/js/opentok.js:42826:23)
at Object.initPublisher (https://static.opentok.com/v2/js/opentok.js:44275:21)
at Object.me.start (https://x/rt.js:457:27)
at b.$scope.start (https://x/ler.js:6:24)
at fn (eval at compile (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:239:266), <anonymous>:4:161)
at e (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:284:187)
at b.$eval (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:148:347)
at b.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:149:52)
at HTMLButtonElement.<anonymous> (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:284:239)
at HTMLButtonElement.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:4:8549)
at HTMLButtonElement.r.handle (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:4:5252)
I might be a bit late, but I'll share my findings. When using a custom UI on your publisher, use the following event:
publisher.on('streamDestroyed',function(event){ event.preventDefault();});
This disallows opentok calling widget destroying events which causes the exception related to this question, however now I don't know how to stop the stream lol, since if I call event.target.destroy() will generate the same exception, lol ... so I'm trying to figure that out.