I have a problem with connecting Steem using SteemJs https://github.com/adcpm/steem
Problem appears only on firefox browser, but Chrome Works correctly.
Our app is coded in Yii2 and JavaScript,
which works fully in front-end
<script src="//cdn.steemjs.com/lib/latest/steem.min.js"></script>
<script>
steem.broadcast.comment('5K8eZVEAMkfejyHxeQJ9R4wvrXowwz7kcxcTVwFGpeGq1x2iKRb',
'',
‘test',
'sci',
'this-is-a-test-article-2',
'this is a test article2',
'test',
'',
function(err, result) {
console.log(err, result);
});
Problem in the following process:
When running request to blockchain , it return null in Chrome.
Null is mean ok! so everything is fine
But when running on Firefox error occures:
Error: 3030000 tx_missing_posting_auth: missing required posting authority
Missing Posting Authority sci
…..
{"ops":[["comment", {"parent_author":"","parent_permlink":"test","author":"sci","permlink":"this-is-a-test-article-2","title":"this is a test article2","body":"test","json_metadata":"\"\""}]],"sigs": ["STM7x7kJhdKzu7gie8gPg5uUDNmLjbcXx7ek2H8UtKxH8qub3V2ut"]}
th_a transaction.cpp:172 verify_authority
Sigs here - is always different,but should be same and must be equal to public key from private: GLS8MfcHZyYioPBsmoYp8AZf4mbwZdsarunFRvuWUySqb3nwPeRwb.
In chrome it is working right key.
This is browser-compatibility problem, or browser feature problem
Please help identify a problem, and possible we can patch it or overcome in another way.
npm install adcpm/steem#dev
Just build it from develop branch and problem will solved. In lib folder you can find steem.min.js.
Related
So I'm trying to run javascript code on website through my WebBrowser in console application but I came across weird bug. This is my code:
object[] mathArgs = { "javascript:setTimeout('__doPostBack(\'someID\',\'\')', 0)" };
mainWebBrowser.Document.InvokeScript("eval", mathArgs);
and after this I receive:
"There was an error in the script on this page:
Line: 1
Char: 1
Expected char ')'
Code: 0"
Funny thing is it works well in WinForms project, there is problem in console app. Am I missing something? Additionally, it's code that works on page I work on.
If your code work without any problem use the "ScriptErrorsSuppressed" property to ignore JS errors :
WebBrowser mainWebBrowser = new WebBrowser {ScriptErrorsSuppressed = true};
// Navigation code gose here
object[] mathArgs = { "javascript:setTimeout('__doPostBack(\'someID\',\'\')', 0)" };
mainWebBrowser?.Document?.InvokeScript("eval", mathArgs);
One of our client is getting ""SCRIPT5: Access is denied" error when accessing web sites on Windows 8.1/IE11. Only one client is having this issue not all.
when we looked at the error message it turns ut it failed when tried to access
_global.localStorage
Client said its working fine if they add our site in "Trusted Site".
the problem we having is that none of our dev/test environments has this issue.we are running same version of OS and IE as client. so we are having bit difficulty trying to reproduce this issue.
sa mentioned here
Access Denied for localstorage in IE10
i have tried turn on/off DOMStorage/Enhance Protection Mode/Protection Mode but still no luck.
our best guess so far is there must be some setting/group policy which applied by Client's IT dept which causes this issue rather code issue as it works for all other clients.
so my question here is
which setting/group policy/domain setting i can check so that i can reproduce this error.
How can i fix the issue w/o making any code change as client has more than 1000 users so only changing the policy by IT dept is the only option here rather asking every user to add to "Trusted Site"
is there anything that i missed to check.
any help would be awesome.
I had the same issue and solved it in the next way:
let storage;
try {
storage = localStorage; // throws error if not supported by browser
} catch(e) { // caching this error and assigning fallback
let innerStorage = {};
storage = {
getItem: function(e) {
return innerStorage[e]
},
setItem: function(e, i) {
return innerStorage[e] = i
},
removeItem: function(e) {
delete innerStorage[e]
}
}
Best regards,
Aleh
I am trying to use MIDI.js to play sounds in the browser.
https://github.com/mudcube/MIDI.js
It works in the chrome browser on one of my computers, but not on my other one (which is a chromebook), or on the chrome browser on two of my friends computers.
it prints to the console
"uh-oh! Something went wrong! Error code: 1" MIDI.js:349
which refers to this part of MIDI.js
navigator.requestMIDIAccess(function (access) {
plugin = access;
output = plugin.getOutput(0);
if (callback) callback();
}, function (err) {
console.log("uh-oh! Something went wrong! Error code: " + err.code );
});
i found this post which seems to be referring to the problem i'm experiencing but i'm not quite sure
https://plus.google.com/+ChrisWilson/posts/cs4J6sS9qmJ
where it says to swap some parts of the code for some reason I couldn't understand
navigator.requestMIDIAccess( successCallback, failureCallback );
becomes:
navigator.requestMIDIAccess().then( successCallback, failureCallback );
but after replacing that part on MIDI.js 344, i get the error message
Uncaught TypeError: Cannot call method 'then' of undefined
Any help on how to fix this problem so it works in all browsers, or at least all chrome browsers, would be greatly appreciated. Thankyou
Chromebooks don't have Web MIDI API support yet (nor on Mac or Windows if you don't enable it, or Windows if you're not running Canary).
I am trying to run a casper test for an internal site. Its running on pre-production environment, the code so far is
var casper = require('casper').create({
verbose: true,
loglevel:"debug"
});
// listening to a custom event
casper.on('page.loaded', function() {
this.echo('The page title is ' + this.getTitle());
this.echo('value is: '+ this.getElementAttribute
('input[id="edit-capture-amount"]',
'value'));
});
casper.start('https://preprod.uk.systemtest.com', function() {
this.echo(this.getTitle());
this.capture('frontpage.png');
// emitting a custom event
this.emit('age.loaded.loaded');
});
casper.run();
as you can see its not much but my problem is the address is not reachable. The capture also shows a blank page. Not sure what i am doing wrong. I have checked the code with cnn and google urls, the title and screen capture works fine. Not sure how to make it work for an internal site.
I had the exact same problem. In my browser I could resolve the url, but capserjs could not. All I got was about::blank for a web page.
Adding the --ignore-ssl-errors=yes worked like a charm!
casperjs mytestjs //didn't work
capserjs --ignore-ssl-errors=yes mytestjs //worked perfect!
Just to be sure.
Can you reach preprod.uk.systemtest.com from the computer on which casper runs ? For example with a ping or wget.
Is there any proxy between your computer and the preprod server ? Or is your system configured to pass through a proxy that should not be used for the preprod server ?
The casper code seems to be ok.
I know this should be a comment but I don't have enough reputation to post a comment.
As far as CasperJs tests are run in localhost, for testing a custom domain/subdomain/host, some headers need to be defined.
I experienced some problems when passing only the HOST header, for instance, snapshots were not taken properly.
I added 2 more headers and now my tests run properly:
casper.on('started', function () {
var testHost = 'preprod.uk.systemtest.com';
this.page.customHeaders = {
'HOST': testHost,
'HTTP_HOST': testHost,
'SERVER_NAME': testHost
};
});
var testing_url: 'http://localhost:8000/app_test.php';
casper.start(_testing_url, function() {
this.echo('I am using symfony, so this should have to show the homepage for the domain: preprod.uk.systemtest.com');
this.echo('An the snapshot is also working');
this.capture('casper_capture.png');
}
LOG:
Runtime Installer begin with version 3.3.0.3650 on Mac OS 10.7.4 x86
Commandline is: -updatecheck
Installed runtime (3.3.0.3650) located at /Library/Frameworks/Adobe AIR.framework
Performing pingback request
Failure during pingback request: [ErrorEvent type="error" bubbles=false cancelable=falsr eventPhase=2 text="Unhandled exception Error: Error #3001" errorID=3001]
Runtime Installer end with exit code 0
It works fine on Windows but fails for Mac.
Digging around I found out that the error code #3001 has something to do with file/directory permission issues.
Checked /Users/internetslave/Library/Application Support/Adobe permissions seems ok. source.
Checked /Library/Frameworks/Adobe AIR.framework seems ok too.
Both had drwxr-xr-x.
UPDATE: permission is not an issue, successfully updated other applications on the same system.
var appUpdater;
function checkForUpdates() {
appUpdater = new air.ApplicationUpdaterUI();
appUpdater.configurationFile = new air.File("app:/update/update-config.xml");
appUpdater.addEventListener(air.ErrorEvent.ERROR, onCheckForUpdatesError);
appUpdater.initialize();
setTimeout(function() {
appUpdater.checkNow();
}, 500);
}
function onCheckForUpdatesError(event) {
alert(event.toString());
}
Cant seem to post the update configuration and descriptor files here.
For those might stumble upon the same problem.
The problem was the ApplicationUpdaterUI has not finished initializing when the method checkNow is called.
So either, change the second parameter of the setTimeout to a higher value or place this part
appUpdater = new air.ApplicationUpdaterUI();
appUpdater.configurationFile = new air.File("app:/update/update-config.xml");
appUpdater.addEventListener(air.ErrorEvent.ERROR, onCheckForUpdatesError);
appUpdater.initialize();
in page onLoad event handler and attach the checkNow method to a button onClick event
function checkUpdates() {
appUpdater.checkNow();
}
<input type="button" onclick="checkUpdates()" />
Thanks!