I'm using the chrisben imgcache.js plugin to cache images,
Since the change to WKWebview this plugin has stopped working for me. I've switched to v2.1.1 which is working fine on Android. I'm using Cordova with the following plugins
cordova-plugin-wkwebview-engine: 1.2.1
cordova-plugin-wkwebview-file-xhr: 2.1.4
The following noted from the console indicates the file is downloaded/stored correctly but when fetching it it fails.
> [Log] INFO: Download complete:
> file:///Users/shadow4768/Library/Developer/CoreSimulator/Devices/3965C47C-7718-48C3-82ED-DF9A2CCB3989/data/Containers/Data/Application/3BFC0F90-F7D4-4DFA-8648-0F440929F835/Library/NoCloud/imgcache/5b1950b1ee383f3fdd0e51bf84dfdbd505006d79
> (cordova.js, line 1540) [Log] INFO: Cached file size: 37161
> (cordova.js, line 1540) [Log] INFO: current size: 2533404 (cordova.js,
> line 1540) [Log] INFO: com.apple.MobileBackup metadata set
> (cordova.js, line 1540) [Log] INFO: File
> getdocument?documentid=41623&width=300 loaded from cache (cordova.js,
> line 1540) [Error] Failed to load resource: unsupported URL
> cdvfile://localhost/library-nosync/imgcache/91c59e590d88a60c252d8281aa165be35a7d5798
The only solutions I have found are related to Ionic,
I initially thought the below code was a fix to realise it might not have been compatible with what I'm using as only some of the functions were now working.
ImgCache.getCachedFileURL(src,
(originalUrl, cacheUrl) => {
const file = new File();
const cacheFileUrl = cacheUrl.replace('cdvfile://localhost/persistent/', file.documentsDirectory);
const localServerFileUrl = cacheFileUrl.replace('file://', 'http://localhost:8080');
//localServerFileUrl contains the loadable url
resolve(localServerFileUrl);
},
(e) => {
console.error('img-cache-error:', e);
reject(e)
});
Any ideas on how I could get around this issue would be greatly appreciated.
Related
I created .cab package using a manual: https://learn.microsoft.com/en-us/windows/iot-core/learn-about-hardware/peripheraldrivers
I copied the file, staged the update, but get error on commit:
[192.168.1.17]: PS C:\Data\USERS\DefaultAccount\Documents> applyupdate -stage .\Contoso.Drivers.oem6.cab
Microsoft (C) C:\windows\system32\ApplyUpdate.exe
INFO: Start staging .\Contoso.Drivers.oem6.cab
INFO: UpdateStateIdle
INFO: Check status...
INFO: No past issues to report
INFO: ProgressStateNone: 0
INFO: Shared data folder found: C:\Data\ProgramData\USOShared\Data
INFO: Copying file: .\Contoso.Drivers.oem6.cab
INFO: Staging succeeded
SUCCESS: Staging succeeded
[192.168.1.17]: PS C:\Data\USERS\DefaultAccount\Documents> applyupdate -commit
Microsoft (C) C:\windows\system32\ApplyUpdate.exe
INFO: Start commit
INFO: UpdateStateIdle
INFO: Check status...
INFO: No past issues to report
INFO: Starting component installation...
applyupdate : ERROR: Could not start update, (0x8024A10F)
+ CategoryInfo : NotSpecified: (ERROR: Could no...e, (0x8024A10F):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
ERROR: Windows Update is already in progress. Please try again after it has finished.
INFO: ProgressStateNone: 0
ERROR: Commit Failed
[192.168.1.17]: PS C:\Data\USERS\DefaultAccount\Documents>
Reboot of the device don't perform the update, no new device in device manger in Windows Device Portal...
What can be a problem?
UPDATE
The problem is about stack updating process: Failed to install CAB file as device is in the middle of an update
UPDATE
Here is the header of the .inf driver file form PC.
[version]
signature="$CHICAGO$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%PRO%
DriverVer=10/01/2018,3.8.28.0
;DLL Ver=08/29/2017,1.0.0.5
CatalogFile=ser2pl.cat
Currently I have two ways to solve the problem:
To solve update problem
To use onboard UART port
In the second way I also have problem, I have null in the SerialPort:
string aqs = SerialDevice.GetDeviceSelector();
DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(aqs);
List<DeviceInformation> list = devices.ToList();
DeviceInformation di = list.First();
serialPort = await SerialDevice.FromIdAsync(di.Id);
serialPort is null
di.Id equals: Id "\\\\?\\ACPI#BCM2836#0#{86e0d1e0-8089-11d0-9ce4-08003e301f73}" string
list.Count equal 1
UPDATE
Here is the question about problem with onboard UART:
Unable to open UART port on Windows IoT with Raspberry Pi 3
UPDATE
I reflashed the device, but have same problem with updates. I have device several hours on, and it still downloads the updates:
Current OS Version: 10.0.17763.107
Downloading updates.
Last checked: 2019-02-14 at 08:10
I am trying to download the pluralsight videos using youtube-dl, but seems not working well and giving the below error. I have a paid pluralsight account.
How can we solve this issue ?
I have taken a reference from: https://gist.github.com/jesperorb/c14aef85735c54f479896cfa6f16a1e5
The error below for reference:-
C:\Users\pc\Downloads\youtube-dl-master\bin>youtube-dl -v --username "XXX#gmail.com" --password "XXX#123" --verbose --sleep-interval 120 "https://app.pluralsight.com/player?course=oauth2-json-web-tokens-openid-connect-introduction&author=dominick-baier&name=oauthintro-m1-overview&clip=0&mode=live"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--username', 'PRIVATE', '--password', 'PRIVATE', '--verbose', '--sleep-interval', '120', 'https://app.pluralsight.com/player?course=oauth2-json-web-tokens-openid-connect-introduction&author=dominick-baier&name=oauthintro-m1-overview&clip=0&mode=live']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.06.19
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: none
[debug] Proxy map: {}
[pluralsight] Downloading login page
[pluralsight] Logging in
[pluralsight] oauthintro-m1-overview-0: Downloading course JSON
[pluralsight] oauthintro-m1-overview-0: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3niajf93\build\youtube_dl\extractor\common.py", line 598, in _request_webpage
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3niajf93\build\youtube_dl\YoutubeDL.py", line 2211, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
I was able to solve this issue. I was not using the latest youtube-dl DLL and so i did the following -
youtube-dl -U
then simply execute the command, its started downloading like below
I've searched around on stackoverflow for other solutions and none of them seem to be the same as the specific issue I met.
We are using wicked_pdf and wkhtmltopdf-binary in a Ruby on Rails application. The code is failing on PDF export only for one particular person who has a significant amount of info compared to others in production (2 nodes) but works fine for others as well as in staging.
Here are the logs we are getting:
INFO: ***************WICKED***************
INFO: Rendered application/_secondary_header.pdf.haml (3.1ms)
...
INFO: Rendered application/show.pdf.haml within layouts/pdf (804.7ms)
INFO: Rendered application/_primary_header.pdf.haml within layouts/pdf (151.8ms)
ERROR: Unable to fulfill your request RuntimeError(Failed to execute:\n"/usr/local/bin/wkhtmltopdf" -q --header-html "file:////tmp/wicked_header_pdf20140813-28740-auazsr.html" --footer-right "[page] of [topage]" --footer-font-size 9 --margin-top 30 --encoding "UTF-8" "file:////tmp/wicked_pdf20140813-28740-1vmda5h.html" "/tmp/wicked_pdf_generated_file20140813-28740-1hzlru0.pdf" \nError: PDF could not be generated!\n Command Error: )
vendor/bundle/ruby/2.1.0/gems/wicked_pdf-0.9.10/lib/wicked_pdf.rb:79:in `rescue in pdf_from_string'
vendor/bundle/ruby/2.1.0/gems/wicked_pdf-0.9.10/lib/wicked_pdf.rb:83:in `pdf_from_string'
vendor/bundle/ruby/2.1.0/gems/wicked_pdf-0.9.10/lib/wicked_pdf/pdf_helper.rb:64:in `make_pdf'
vendor/bundle/ruby/2.1.0/gems/wicked_pdf-0.9.10/lib/wicked_pdf/pdf_helper.rb:78:in `make_and_send_pdf'
vendor/bundle/ruby/2.1.0/gems/wicked_pdf-0.9.10/lib/wicked_pdf/pdf_helper.rb:21:in `render_with_wicked_pdf'
Code within application:
controller.rb
def show
render pdf: file_name,
layout: 'pdf',
margin: {
top: 30
},
header: {
html: {
template: '_primary_header.pdf.haml'
}
},
footer: {
right: I18n.t('pdf.page_description'),
font_size: 9
},
encoding: 'UTF-8'
end
System details:
Rails 4
Ruby 2.1.0
wicked_pdf 0.9.10
wkhtmltopdf-binary 0.9.9.1
Note:
This error log appears on both of the production nodes.
It would be nice if someone can provide any assumptions on the cause of this issue.
Any input would be appreciated.
I have updated wkhtmltopdf-binary gem and everything worked fine.
I'm 3 months new into dart and I've been fairly lucky not to have encountered any issues that couldn't be fixed from answers found on the net, but this one has stumped me.
I downloaded this sample app (https://github.com/vsavkin/angulardart-sample-app) installed it into dart-editor (on my mac mini) using Open Existing Folder and then running get Pub Get (or even Pub Update) on the pubspec.yaml file.
I was getting dartium loading with a running app until I upgraded the SDK from 1.4.2 to 1.5.8 and the pubspec.yaml file from
environment:
sdk: '>=1.4.2 <2.0.0' to
environment:
sdk: '>=1.5.8 <2.0.0'
where everything just broke and i am now getting these types of errors in dartium which I'd like to know how to fix (reverting hasn't helped, 404's are still present - is there some old cache that's being read that I can't find?):
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/packages/shadow_dom/shadow_dom.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/routing/static_keys.dart
An error occurred loading file: package:angular/routing/static_keys.dart package:angular/routing/static_keys.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/cache/module.dart
An error occurred loading file: package:angular/cache/module.dart package:angular/cache/module.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/core_dom/directive_injector.dart
An error occurred loading file: package:angular/core_dom/directive_injector.dart package:angular/core_dom/directive_injector.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/cache/js_cache_register.dart
An error occurred loading file: package:angular/cache/js_cache_register.dart package:angular/cache/js_cache_register.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/directive/static_keys.dart
An error occurred loading file: package:angular/directive/static_keys.dart package:angular/directive/static_keys.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/core/static_keys.dart
An error occurred loading file: package:angular/core/static_keys.dart package:angular/core/static_keys.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/di/src/reflector.dart
An error occurred loading file: package:di/src/reflector.dart package:di/src/reflector.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/change_detection/ast_parser.dart
An error occurred loading file: package:angular/change_detection/ast_parser.dart package:angular/change_detection/ast_parser.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/angular/core_dom/compiler_config.dart
An error occurred loading file: package:angular/core_dom/compiler_config.dart package:angular/core_dom/compiler_config.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/di/check_bind_args.dart
An error occurred loading file: package:di/check_bind_args.dart package:di/check_bind_args.dart:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/aa-app/web/packages/di/src/reflector_dynamic.dart
An error occurred loading file: package:di/src/reflector_dynamic.dart package:di/src/reflector_dynamic.dart:1
Have tried starting from scratch
Have tried different versions of the angular package ie version 11.0, 12.0, 13.0
Have tried different versions of SDK from 1.4.2 to 1.5.3 to 1.5.8 still the same output
What on earth have i done to ruin something that was working so slickly?
The error "Module.DEFAULT_REFLECTOR not initialized" is thrown because the di transformer is not executed.
You need to add the anfular transformer to your pubspec.yaml (which includes the di transformer)
I've installed dajaxice by this tutorial:
Copied folder "dajaxice" (from archive) to project folder.
Added all changes to setting.py & urls.py
Added next lines to template:
{% load dajaxice_templatetags %}
{% dajaxice_js_import %}
Created ajax.py in the project folder
Code from ajax.py:
from django.utils import simplejson
from dajaxice.core import dajaxice_functions
#dajaxice_register
def example1(request):
return simplejson.dumps({'message': 'hello world'})
dajaxice_functions.register(example1)
Code from .js file:
$("#id_submit").click(function(){
Dajaxice.theproject.example1(callback_example);
console.log("test clicked");
return false; });
When I restart the project in browser at first request I got:
ImportError at / No module named dajax.core
Request Method: GET
Request URL: http:// 127.0.0.1:8000/
Django Version: 1.4
Exception Type: ImportError
Exception Value: No module named dajax.core
Exception Location: C:\Python27\lib\importlib\__init__.py in import_module, line 37
Python Executable: C:\Python27\python.exe
Python Version: 2.7.3
Python Path: ['E:\\Projects\\py\\sites\\theproject', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL']
Server time: Fri, 3 Aug 2012 14:50:03 +0300
Any ideas?
load ajax.py in init.py(of main app)
Dajaxice is updating all the time. Make sure you have downloaded and installed the correct version of Dajax for the document you are reading. In your error message, it says, "No module named dajax.core", which is probably because you are using the wrong version.
And the current version of Dajaxice and Dajax can be found here:
https://pypi.python.org/pypi/django-dajax
https://pypi.python.org/pypi/django-dajaxice/0.5.5