Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with Chrome on MacOS #874

Closed
JRosanowski opened this issue Feb 22, 2017 · 22 comments
Closed

Doesn't work with Chrome on MacOS #874

JRosanowski opened this issue Feb 22, 2017 · 22 comments

Comments

@JRosanowski
Copy link

I guess real Mac users wouldn't have noticed this since they would use Safari but I've got Chrome installed on a Mac at work and couldn't get ungit to work. Chrome just comes up with the error "Network error - the requested URL could not be retrieved". After trying a whole bunch of things I finally thought maybe it was the browser. Sure enough it works fine with Safari. If it can't be fixed it might be worth a note somewhere that it doesn't work to save any other pseudo Mac users.

@lfx
Copy link

lfx commented Feb 24, 2017

Can't reproduce - running latest MacOS with the latest Chrome. All works fine.

@jung-kim
Copy link
Collaborator

@JRosanowski It works fine for me. Can you please share the URL you are trying along with the client console log?

@JRosanowski
Copy link
Author

JRosanowski commented Feb 26, 2017 via email

@jung-kim
Copy link
Collaborator

Perhaps it's ipv6 problem? For mac, it is located in /etc/apache2/httpd.conf.

@ylecuyer
Copy link
Contributor

I have the same issue with chrome but not only on macos also on chromium linux.

The error seems to be a cors issue with keen.js and the /api/log

@kaizvn
Copy link

kaizvn commented Mar 26, 2017

I got this error :

Unhandled rejection TypeError: First argument must be a string or Buffer
    at ServerResponse.OutgoingMessage.end (_http_outgoing.js:555:11)
    at /usr/local/lib/node_modules/ungit/src/server.js:191:9
    at tryCatcher (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/usr/local/lib/node_modules/ungit/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

maybe it relates to this request/request#1904

edit:

  • It's so funny that the error cannot reproduce in local. I guess it's related to version of package request or package bluebird.
  • Following my investigation result, the problem is come from cache.resolveFunc when it return not string type nor Buffer type, then at server.js:191:9: res.end throw error.

@ylecuyer
Copy link
Contributor

I just had the same error on Firefox / Linux:

cross domain error ungit

@jung-kim
Copy link
Collaborator

@kaizvn and @ylecuyer Thank for the detailed reports! I do have a suspicion and will be trying out as soon as I get some free time but may ask for help if I have difficult time reproducing this bug.

This bug seems to be introduced in #870 and possibly related to #878 if anybody is interested in having a go at it.

@ylecuyer
Copy link
Contributor

@codingtwinky after playing with the dev version it seems that it's because ublock doesn't like /api/log

   Static filter /api/log? found in:
       * EasyPrivacy

@jung-kim
Copy link
Collaborator

hmmm, although this may be due to ublock being a problem as it was in #887 was it entirely ublock white list issue? Log seems to be indicating cache value...

@ylecuyer
Copy link
Contributor

Yes, after whitelisting localhost there is no errors in the console

@bes-internal
Copy link
Contributor

It may be necessary to use something like FuckAdBlock on the oops page and ask to turn off adblocker for this domain

jung-kim added a commit that referenced this issue Apr 3, 2017
Fix cached promised values not resolving properly in some platforms.  #874 #878 #887
@kaizvn
Copy link

kaizvn commented Apr 4, 2017

@codingtwinky I can confirm that this's fixed in 1.1.13 already.

@capaj
Copy link

capaj commented Apr 5, 2017

@kaizvn really? I am seeing this on 1.1.13:

The key "" is not recognized and ignored.
(index):32 App version: 1.1.13
program-events.js:8 Event: Object {event: "navigated-to-path", path: "/home/capaj/git_projects/be/frontend-be.com"}
program-events.js:8 Event: Object {event: "navigation-changed", path: "repository?path=%2Fhome%2Fcapaj%2Fgit_projects%2Fbe%2Ffrontend-be.com", oldPath: undefined}
(index):898 GET https://d26b395fwzu5fz.cloudfront.net/3.4.0-rc/keen.min.js net::ERR_BLOCKED_BY_CLIENT
(anonymous) @ (index):898
(anonymous) @ (index):898
(anonymous) @ (index):898
program-events.js:8 Event: Object {event: "connected"}
VM491:1 GET http://localhost:8448/api/log?path=%2Fhome%2Fcapaj%2Fgit_projects%2Fbe%2Ffrontend-be.com&limit=25&skip=0&socketId=6 net::ERR_BLOCKED_BY_CLIENT
(anonymous) @ VM491:1
Server._httpJsonRequest @ server.js:76
(anonymous) @ server.js:111
Promise._execute @ bluebird.js:968
Promise._resolveFromExecutor @ bluebird.js:3209
Promise @ bluebird.js:2805
Server.queryPromise @ server.js:110
Server.getPromise @ server.js:146
GraphViewModel.loadNodesFromApi @ graph.js:112
GraphViewModel @ graph.js:78
(anonymous) @ graph.js:11
components.create @ components.js:15
RepositoryViewModel @ repository.js:18
(anonymous) @ repository.js:8
components.create @ components.js:15
(anonymous) @ path.js:63
tryCatcher @ bluebird.js:5215
Promise._settlePromiseFromHandler @ bluebird.js:3238
Promise._settlePromise @ bluebird.js:3295
Promise._settlePromise0 @ bluebird.js:3340
Promise._settlePromises @ bluebird.js:3419
(anonymous) @ bluebird.js:175
program-events.js:8 Event: Object {event: "current-remote-changed", newRemote: "origin"}
program-events.js:8 Event: Object {event: "init-tooltip"}
bluebird.js:1542 Warning: a promise was rejected with a non-error: [object Object]
    at http://localhost:8448/js/ungit.js:5609:15
    at http://localhost:8448/js/ungit.js:5575:5
    at XMLHttpRequest.httpRequest.onreadystatechange (http://localhost:8448/js/ungit.js:5556:12)
From previous event:
    at Server.queryPromise (http://localhost:8448/js/ungit.js:5603:10)
    at Server.getPromise (http://localhost:8448/js/ungit.js:5639:15)
    at GraphViewModel.loadNodesFromApi (http://localhost:8448/plugins/graph/graph.bundle.js:917:22)
    at new GraphViewModel (http://localhost:8448/plugins/graph/graph.bundle.js:883:8)
    at http://localhost:8448/plugins/graph/graph.bundle.js:816:10
    at Object.components.create (http://localhost:8448/js/ungit.js:50593:10)
    at new RepositoryViewModel (http://localhost:8448/plugins/repository/repository.bundle.js:19:27)
    at http://localhost:8448/plugins/repository/repository.bundle.js:9:10
    at Object.components.create (http://localhost:8448/js/ungit.js:50593:10)
    at http://localhost:8448/plugins/path/path.bundle.js:64:38
From previous event:
    at PathViewModel.updateStatus (http://localhost:8448/plugins/path/path.bundle.js:55:6)
    at PathViewModel.shown (http://localhost:8448/plugins/path/path.bundle.js:46:8)
    at init (http://localhost:8448/js/ungit.js:5419:20)
    at http://localhost:8448/js/ungit.js:25368:46
    at Object.ignore (http://localhost:8448/js/ungit.js:23480:33)
    at http://localhost:8448/js/ungit.js:25367:48
    at Object.arrayForEach (http://localhost:8448/js/ungit.js:22159:17)
    at applyBindingsToNodeInternal (http://localhost:8448/js/ungit.js:25353:22)
    at applyBindingsToNodeAndDescendantsInternal (http://localhost:8448/js/ungit.js:25233:37)
    at Object.ko.applyBindings (http://localhost:8448/js/ungit.js:25444:9)
    at http://localhost:8448/js/ungit.js:27303:24
    at invokeForEachNodeInContinuousRange (http://localhost:8448/js/ungit.js:27254:13)
    at activateBindingsOnContinuousNodeArray (http://localhost:8448/js/ungit.js:27301:13)
    at executeTemplate (http://localhost:8448/js/ungit.js:27349:13)
    at ko.dependentObservable.disposeWhen (http://localhost:8448/js/ungit.js:27391:46)
    at Function.evaluateImmediate_CallReadThenEndDependencyDetection (http://localhost:8448/js/ungit.js:24183:103)
    at Function.evaluateImmediate_CallReadWithDependencyDetection (http://localhost:8448/js/ungit.js:24150:29)
    at Function.evaluateImmediate (http://localhost:8448/js/ungit.js:24111:28)
    at Object.ko.computed.ko.dependentObservable (http://localhost:8448/js/ungit.js:23964:28)
printWarning @ bluebird.js:1542
formatAndLogError @ bluebird.js:1258
warn @ bluebird.js:1153
Promise._warn @ bluebird.js:763
Promise._rejectCallback @ bluebird.js:3198
(anonymous) @ bluebird.js:3212
(anonymous) @ server.js:116
(anonymous) @ server.js:82
httpRequest.onreadystatechange @ server.js:63
bluebird.js:1542 Warning: a promise was rejected with a non-error: [object Object]
    at GraphViewModel.loadNodesFromApi (http://localhost:8448/plugins/graph/graph.bundle.js:959:15)
    at new GraphViewModel (http://localhost:8448/plugins/graph/graph.bundle.js:883:8)
    at http://localhost:8448/plugins/graph/graph.bundle.js:816:10
    at Object.components.create (http://localhost:8448/js/ungit.js:50593:10)
    at new RepositoryViewModel (http://localhost:8448/plugins/repository/repository.bundle.js:19:27)
    at http://localhost:8448/plugins/repository/repository.bundle.js:9:10
    at Object.components.create (http://localhost:8448/js/ungit.js:50593:10)
    at http://localhost:8448/plugins/path/path.bundle.js:64:38
From previous event:
    at PathViewModel.updateStatus (http://localhost:8448/plugins/path/path.bundle.js:55:6)
    at PathViewModel.shown (http://localhost:8448/plugins/path/path.bundle.js:46:8)
    at init (http://localhost:8448/js/ungit.js:5419:20)
    at http://localhost:8448/js/ungit.js:25368:46
    at Object.ignore (http://localhost:8448/js/ungit.js:23480:33)
    at http://localhost:8448/js/ungit.js:25367:48
    at Object.arrayForEach (http://localhost:8448/js/ungit.js:22159:17)
    at applyBindingsToNodeInternal (http://localhost:8448/js/ungit.js:25353:22)
    at applyBindingsToNodeAndDescendantsInternal (http://localhost:8448/js/ungit.js:25233:37)
    at Object.ko.applyBindings (http://localhost:8448/js/ungit.js:25444:9)
    at http://localhost:8448/js/ungit.js:27303:24
    at invokeForEachNodeInContinuousRange (http://localhost:8448/js/ungit.js:27254:13)
    at activateBindingsOnContinuousNodeArray (http://localhost:8448/js/ungit.js:27301:13)
    at executeTemplate (http://localhost:8448/js/ungit.js:27349:13)
    at ko.dependentObservable.disposeWhen (http://localhost:8448/js/ungit.js:27391:46)
    at Function.evaluateImmediate_CallReadThenEndDependencyDetection (http://localhost:8448/js/ungit.js:24183:103)
    at Function.evaluateImmediate_CallReadWithDependencyDetection (http://localhost:8448/js/ungit.js:24150:29)
    at Function.evaluateImmediate (http://localhost:8448/js/ungit.js:24111:28)
    at Object.ko.computed.ko.dependentObservable (http://localhost:8448/js/ungit.js:23964:28)
printWarning @ bluebird.js:1542
formatAndLogError @ bluebird.js:1258
warn @ bluebird.js:1153
Promise._warn @ bluebird.js:763
Promise._rejectCallback @ bluebird.js:3198
Promise._settlePromiseFromHandler @ bluebird.js:3247
Promise._settlePromise @ bluebird.js:3295
Promise._settlePromise0 @ bluebird.js:3340
Promise._settlePromises @ bluebird.js:3415
(anonymous) @ bluebird.js:175
server.js:174 Unhandled Promise ERROR:  Object {errorCode: "cross-domain-error", error: Object} Promise {_bitField: 18087936, _fulfillmentHandler0: Object, _rejectionHandler0: undefined, _promise0: undefined, _receiver0: undefined…}
(anonymous) @ server.js:174
fireRejectionEvent @ bluebird.js:1274
Promise._notifyUnhandledRejection @ bluebird.js:729
(anonymous) @ bluebird.js:154
program-events.js:8 Event: Object {event: "git-crash-error"}
program-events.js:8 Event: Object {event: "remote-tags-update", tags: Array(205)}
program-events.js:8 Event: Object {event: "git-directory-changed"}
VM491:1 GET http://localhost:8448/api/log?path=%2Fhome%2Fcapaj%2Fgit_projects%2Fbe%2Ffrontend-be.com&limit=25&skip=0&socketId=6 net::ERR_BLOCKED_BY_CLIENT
(anonymous) @ VM491:1
Server._httpJsonRequest @ server.js:76
(anonymous) @ server.js:111
Promise._execute @ bluebird.js:968
Promise._resolveFromExecutor @ bluebird.js:3209
Promise @ bluebird.js:2805
Server.queryPromise @ server.js:110
Server.getPromise @ server.js:146
GraphViewModel.loadNodesFromApi @ graph.js:112
invokeFunc @ lodash.js:10350
leadingEdge @ lodash.js:10360
debounced @ lodash.js:10425
GraphViewModel.onProgramEvent @ graph.js:285
RepositoryViewModel.onProgramEvent @ repository.js:44
PathViewModel.onProgramEvent @ path.js:84
AppViewModel.onProgramEvent @ app.js:96
(anonymous) @ main.js:159
execute @ signals:93
dispatch @ signals:384
Signal.dispatch @ signals:187
(anonymous) @ server.js:34
n.emit @ universalModuleDefinition:2
n.onevent @ universalModuleDefinition:3
n.onpacket @ universalModuleDefinition:3
(anonymous) @ universalModuleDefinition:3
n.emit @ universalModuleDefinition:2
n.ondecoded @ universalModuleDefinition:1
(anonymous) @ universalModuleDefinition:3
r.emit @ universalModuleDefinition:1
s.add @ universalModuleDefinition:1
n.ondata @ universalModuleDefinition:1
(anonymous) @ universalModuleDefinition:3
n.emit @ universalModuleDefinition:2
n.onPacket @ universalModuleDefinition:2
(anonymous) @ universalModuleDefinition:2
n.emit @ universalModuleDefinition:2
n.onPacket @ universalModuleDefinition:2
n.onData @ universalModuleDefinition:2
ws.onmessage @ universalModuleDefinition:3
bluebird.js:1542 Warning: a promise was rejected with a non-error: [object Object]
    at http://localhost:8448/js/ungit.js:5609:15
    at http://localhost:8448/js/ungit.js:5575:5
    at XMLHttpRequest.httpRequest.onreadystatechange (http://localhost:8448/js/ungit.js:5556:12)
From previous event:
    at Server.queryPromise (http://localhost:8448/js/ungit.js:5603:10)
    at Server.getPromise (http://localhost:8448/js/ungit.js:5639:15)
    at GraphViewModel.loadNodesFromApi (http://localhost:8448/plugins/graph/graph.bundle.js:917:22)
    at invokeFunc (http://localhost:8448/js/ungit.js:38287:23)
    at leadingEdge (http://localhost:8448/js/ungit.js:38297:26)
    at GraphViewModel.debounced [as loadNodesFromApiThrottled] (http://localhost:8448/js/ungit.js:38362:20)
    at GraphViewModel.onProgramEvent (http://localhost:8448/plugins/graph/graph.bundle.js:1090:10)
    at RepositoryViewModel.onProgramEvent (http://localhost:8448/plugins/repository/repository.bundle.js:45:45)
    at PathViewModel.onProgramEvent (http://localhost:8448/plugins/path/path.bundle.js:85:44)
    at AppViewModel.onProgramEvent (http://localhost:8448/plugins/app/app.bundle.js:97:20)
    at http://localhost:8448/js/ungit.js:50754:11
    at SignalBinding.execute (http://localhost:8448/js/ungit.js:50182:48)
    at Signal.dispatch (http://localhost:8448/js/ungit.js:50473:84)
    at Signal.dispatch (http://localhost:8448/js/ungit.js:50276:39)
    at n.<anonymous> (http://localhost:8448/js/ungit.js:5527:19)
    at n.emit (http://localhost:8448/socket.io/socket.io.js:2:28725)
    at n.onevent (http://localhost:8448/socket.io/socket.io.js:3:5720)
    at n.onpacket (http://localhost:8448/socket.io/socket.io.js:3:5342)
    at n.<anonymous> (http://localhost:8448/socket.io/socket.io.js:3:7486)
printWarning @ bluebird.js:1542
formatAndLogError @ bluebird.js:1258
warn @ bluebird.js:1153
Promise._warn @ bluebird.js:763
Promise._rejectCallback @ bluebird.js:3198
(anonymous) @ bluebird.js:3212
(anonymous) @ server.js:116
(anonymous) @ server.js:82
httpRequest.onreadystatechange @ server.js:63
bluebird.js:1542 Warning: a promise was rejected with a non-error: [object Object]
    at GraphViewModel.loadNodesFromApi (http://localhost:8448/plugins/graph/graph.bundle.js:959:15)
    at invokeFunc (http://localhost:8448/js/ungit.js:38287:23)
    at leadingEdge (http://localhost:8448/js/ungit.js:38297:26)
    at GraphViewModel.debounced [as loadNodesFromApiThrottled] (http://localhost:8448/js/ungit.js:38362:20)
    at GraphViewModel.onProgramEvent (http://localhost:8448/plugins/graph/graph.bundle.js:1090:10)
    at RepositoryViewModel.onProgramEvent (http://localhost:8448/plugins/repository/repository.bundle.js:45:45)
    at PathViewModel.onProgramEvent (http://localhost:8448/plugins/path/path.bundle.js:85:44)
    at AppViewModel.onProgramEvent (http://localhost:8448/plugins/app/app.bundle.js:97:20)
    at http://localhost:8448/js/ungit.js:50754:11
    at SignalBinding.execute (http://localhost:8448/js/ungit.js:50182:48)
    at Signal.dispatch (http://localhost:8448/js/ungit.js:50473:84)
    at Signal.dispatch (http://localhost:8448/js/ungit.js:50276:39)
    at n.<anonymous> (http://localhost:8448/js/ungit.js:5527:19)
    at n.emit (http://localhost:8448/socket.io/socket.io.js:2:28725)
    at n.onevent (http://localhost:8448/socket.io/socket.io.js:3:5720)
    at n.onpacket (http://localhost:8448/socket.io/socket.io.js:3:5342)
    at n.<anonymous> (http://localhost:8448/socket.io/socket.io.js:3:7486)
    at n.emit (http://localhost:8448/socket.io/socket.io.js:2:28725)
printWarning @ bluebird.js:1542
formatAndLogError @ bluebird.js:1258
warn @ bluebird.js:1153
Promise._warn @ bluebird.js:763
Promise._rejectCallback @ bluebird.js:3198
Promise._settlePromiseFromHandler @ bluebird.js:3247
Promise._settlePromise @ bluebird.js:3295
Promise._settlePromise0 @ bluebird.js:3340
Promise._settlePromises @ bluebird.js:3415
(anonymous) @ bluebird.js:175
server.js:174 Unhandled Promise ERROR:  Object {errorCode: "cross-domain-error", error: Object} Promise {_bitField: 18087936, _fulfillmentHandler0: Object, _rejectionHandler0: undefined, _promise0: undefined, _receiver0: undefined…}
(anonymous) @ server.js:174
fireRejectionEvent @ bluebird.js:1274
Promise._notifyUnhandledRejection @ bluebird.js:729
(anonymous) @ bluebird.js:154
program-events.js:8 Event: Object {event: "git-crash-error"}

@ylecuyer
Copy link
Contributor

ylecuyer commented Apr 5, 2017 via email

@capaj
Copy link

capaj commented Apr 5, 2017

@ylecuyer yes, ublock whitelisting localhost helped, but I thought that the fix was supposed to make it work even with an adblock.

@oupala
Copy link

oupala commented Apr 11, 2017

I don't know if the fix is supposed to fix the problem.

But I still encounter it.

@jung-kim
Copy link
Collaborator

jung-kim commented Apr 12, 2017

To clarify, current work around for ad block issue is to white list ungit's url. I'm not aware of possible fix as this is ad block having false positive filtering on localhost or other url, which not much ungit can do.

If there is a way ungit can do to tell ad block that ungit is not an ad, let me know so I can sell it to ad agencies.

@jung-kim
Copy link
Collaborator

I'm closing this issue as the issue is related to ad block which we know and documented at readme.md. I would encouraged to open a new issue with log and detailed description if necessary.

@campersau
Copy link
Collaborator

@codingtwinky we could fix it. We just have to rename the /api/log endpoint.

See #892 (comment)

@bes-internal
Copy link
Contributor

This means that we will somehow test the blocklists in the search for "incorrect" url names? No! We need to detect the blocker and ask for exceptions

@jung-kim
Copy link
Collaborator

Hmm I thought it was change in their side complaining about URL being suspicious not due to traffics. I may try to transpile keen and google analytics but it is bit silly that an api path is cause filtering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants