Author Topic: webwallet on ios  (Read 3899 times)

0 Members and 1 Guest are viewing this topic.

Offline svk

I'll try to have a look on my macbook, it should at least load, no reason not to. There's still an issue with the backups afaik though which means it's not ideal using safari.

Sent fra min MotoG3 via Tapatalk

Worker: dev.bitsharesblocks

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
So Safari doesn't work properly with WebSockets?! Weird

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
I am even more confused by the dev-server.  The console still shows a date time error, but there is another connection error that recurs every few seconds.  That might be the actual problem.

date time error
Code: [Select]
[Error] TypeError: undefined is not an object (evaluating 'pattern
                .replace')
createDateTimeFormats
ToDateTimeFormats
InitializeDateTimeFormat
addLocaleData
value
(anonymous function)
(anonymous function)
(anonymous function) (app.js:146)
webpackJsonpCallback (app.js:40)
global code (1.app.js:1)

connection issue
Code: [Select]
[Log] [HMR] Waiting for update signal from WDS...
[Error] Failed to load resource: Could not connect to the server. (info, line 0)
[Error] [WDS] Disconnected!
onclose
dispatchEvent
(anonymous function)
(anonymous function)

The connection issue seems to point to app.js 1329 and http://localhost:8080/sockjs-node/info?t=1460227644397 which just shows a page that says
Code: [Select]
{"websocket":true,"origins":["*:*"],"cookie_needed":false,"entropy":2488820754}
As it fails to load over and over again the entropy changes but nothing else.

app.js line 1329 is the eval line in this function
Code: [Select]
/* 73 */
/*!****************************************!*\
  !*** (webpack)/hot/only-dev-server.js ***!
  \****************************************/
/***/ function(module, exports, __webpack_require__) {

eval("/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n/*globals window __webpack_hash__ */\r\nif(true) {\r\n\tvar lastData;\r\n\tvar upToDate = function upToDate() {\r\n\t\treturn lastData.indexOf(__webpack_require__.h()) >= 0;\r\n\t};\r\n\tvar check = function check() {\r\n\t\tmodule.hot.check(function(err, updatedModules) {\r\n\t\t\tif(err) {\r\n\t\t\t\tif(module.hot.status() in {\r\n\t\t\t\t\t\tabort: 1,\r\n\t\t\t\t\t\tfail: 1\r\n\t\t\t\t\t}) {\r\n\t\t\t\t\tconsole.warn(\"[HMR] Cannot check for update. Need to do a full reload!\");\r\n\t\t\t\t\tconsole.warn(\"[HMR] \" + err.stack || err.message);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.warn(\"[HMR] Update check failed: \" + err.stack || err.message);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(!updatedModules) {\r\n\t\t\t\tconsole.warn(\"[HMR] Cannot find update. Need to do a full reload!\");\r\n\t\t\t\tconsole.warn(\"[HMR] (Probably because of restarting the webpack-dev-server)\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tmodule.hot.apply({\r\n\t\t\t\tignoreUnaccepted: true\r\n\t\t\t}, function(err, renewedModules) {\r\n\t\t\t\tif(err) {\r\n\t\t\t\t\tif(module.hot.status() in {\r\n\t\t\t\t\t\t\tabort: 1,\r\n\t\t\t\t\t\t\tfail: 1\r\n\t\t\t\t\t\t}) {\r\n\t\t\t\t\t\tconsole.warn(\"[HMR] Cannot apply update. Need to do a full reload!\");\r\n\t\t\t\t\t\tconsole.warn(\"[HMR] \" + err.stack || err.message);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.warn(\"[HMR] Update failed: \" + err.stack || err.message);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!upToDate()) {\r\n\t\t\t\t\tcheck();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t__webpack_require__(/*! ./log-apply-result */ 74)(updatedModules, renewedModules);\r\n\r\n\t\t\t\tif(upToDate()) {\r\n\t\t\t\t\tconsole.log(\"[HMR] App is up to date.\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\tvar addEventListener = window.addEventListener ? function(eventName, listener) {\r\n\t\twindow.addEventListener(eventName, listener, false);\r\n\t} : function(eventName, listener) {\r\n\t\twindow.attachEvent(\"on\" + eventName, listener);\r\n\t};\r\n\taddEventListener(\"message\", function(event) {\r\n\t\tif(typeof event.data === \"string\" && event.data.indexOf(\"webpackHotUpdate\") === 0) {\r\n\t\t\tlastData = event.data;\r\n\t\t\tif(!upToDate() && module.hot.status() === \"idle\") {\r\n\t\t\t\tconsole.log(\"[HMR] Checking for updates on the server...\");\r\n\t\t\t\tcheck();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tconsole.log(\"[HMR] Waiting for update signal from WDS...\");\r\n} else {\r\n\tthrow new Error(\"[HMR] Hot Module Replacement is disabled.\");\r\n}\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/hot/only-dev-server.js\n ** module id = 73\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///(webpack)/hot/only-dev-server.js?");

/***/ },

edit**
On bitshares.openledger.info I get
Code: [Select]
[Error] WebSocket network error: The operation couldn’t be completed. Connection refused (x14)Is that the same error, just production versus dev-server?
« Last Edit: April 09, 2016, 07:14:38 pm by puppies »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
Have you ever tried to compile the web wallet on your own? Because instead of compiling it for a productive release (the code that you see), you can do so with debugging informations and withouth "uglification" by using the webpack-dev-server ..
If you have install npm, all you need to do is run "npm install" in the dl/ and web/ folder and then do "npm start" in the webfolder .. it will open up a development port on localhost .. making it listen to the localnetwork instead of localhost, you should be able to load that from an iphone in your local network. You get what I am trying to say?

Yeah.  I understand I will give that a try.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Have you ever tried to compile the web wallet on your own? Because instead of compiling it for a productive release (the code that you see), you can do so with debugging informations and withouth "uglification" by using the webpack-dev-server ..
If you have install npm, all you need to do is run "npm install" in the dl/ and web/ folder and then do "npm start" in the webfolder .. it will open up a development port on localhost .. making it listen to the localnetwork instead of localhost, you should be able to load that from an iphone in your local network. You get what I am trying to say?

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
So a little bit more detail.  I get the same loading screen on Chrome on iOS.  To me it looks like there is an error in the 1app.js in regards to the date time, but I could be way off.  The error that shows up is
Code: [Select]
undefined is not an object (evaluating 'o.replace')its in the following function on the second to last line.  Line 1233:197 in the full pastebin
Code: [Select]
        function o(e) {
            var a, o, l, c, u, m = e.availableFormats, g = e.timeFormats, h = e.dateFormats, d = [], f = [], p = [];
            for (a in m)
                m.hasOwnProperty(a) && (o = m[a], l = i(a, o), l && (d.push(l), r(l) ? p.push(l) : n(l) && f.push(l)));
            for (a in g)
                g.hasOwnProperty(a) && (o = g[a], l = i(a, o), l && (d.push(l), f.push(l)));
            for (a in h)
                h.hasOwnProperty(a) && (o = h[a], l = i(a, o), l && (d.push(l), p.push(l)));
            for (c = 0; c < f.length; c += 1)
                for (u = 0; u < p.length; u += 1)
                    o = "long" === p[u].month ? p[u].weekday ? e.full : e["long"] : "short" === p[u].month ? e.medium : e["short"], l = t(p[u], f[c]), l.originalPattern = o, l.extendedPattern = o.replace("{0}", f[c].extendedPattern).replace("{1}", p[u].extendedPattern).replace(/^[,\s]+|[,\s]+$/gi, ""), d.push(s(l));
            return d
        }
Here is the full non working 1.app.js  http://pastebin.com/Y5v2WkPp
 

and here is an older working 1.app.js http://pastebin.com/tv90KhtT

To me it looks like it is handling the date time issue with this function
Code: [Select]
       function s(e) {
            function n(e, n) {
                var a = new Array((e.match(/M/g) || []).length + 1), r = new Array((e.match(/E/g) || []).length + 1);
                return a.length > 2 && (n = n.replace(/(M|L)+/, a.join("$1"))), r.length > 2 && (n = n.replace(/([Eec])+/, r.join("$1"))), n
            }
            var s, i, o, l, c, u = e.availableFormats, m = e.timeFormats, g = e.dateFormats, h = e.medium, d = [], p = [], f = [];
            for (s in u)
                u.hasOwnProperty(s) && (i = n(s, u[s]), o = t(i), o && (d.push(o), a(o) ? f.push(i) : r(o) && p.push(i)));
            for (l = 0; l < p.length; l += 1)
                for (c = 0; c < f.length; c += 1)
                    i = h.replace("{0}", p[l]).replace("{1}", f[c]).replace(/^[,\s]+|[,\s]+$/gi, ""), o = t(i), o && d.push(o);
            for (s in m)
                m.hasOwnProperty(s) && (i = n(s, m[s]), o = t(i), o && d.push(o));
            for (s in g)
                g.hasOwnProperty(s) && (i = n(s, g[s]), o = t(i), o && d.push(o));
            return d
        }

Any help or suggestions would be greatly appreciated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
Great idea Xeroc.  Apparently there is but it needs to be connected to a computer and read that way.  I will install the software on my mac when I get home to it.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Does Safari have a Javascript Console that maybe gives us a little more information about what is going on?

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
my webwallet used to work in safari on my iphone.  Now its just a loading screen that never finishes loading.  Is there a trick to getting the wallet to load properly on ios?  I have tried to use the older version of npm, and of course have run npm install in the ios folder.  In short I have tried building the newer wallets exactly as I used to build the old wallets.  The only thing I haven't tried is to build an older gui to see if that what is needed. 

Any ideas?
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads