[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2019-04-05 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16811367#comment-16811367
 ] 

ASF subversion and git services commented on CB-12035:
--

Commit db0d4b54bcd9df1bfb4da9fd0ce1aaaf4215 in 
cordova-plugin-network-information's branch refs/heads/master from Jesse 
MacFadyen
[ 
https://gitbox.apache.org/repos/asf?p=cordova-plugin-network-information.git;h=db0d4b5
 ]

Merge pull request #74 from PieterVanPoyer/master

CB-12035 (android) Fix bug [cordova-plugin-network-information] connection info 
is not reliable on Android 6

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-12-04 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16709277#comment-16709277
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer edited a comment on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-444267102
 
 
   Jow,
   It's been approved and tested by terpro!
   Who can merge this, and make a release of this?
   
   Some Github users did already fork my repo, to make use of this fix.
   
   Kind regards,
   Pieter


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-12-04 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16709276#comment-16709276
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-444267102
 
 
   Jow,
   It's been approved and tested by terpro!
   Who can merge this, and make a release of this?
   
   Kind regards,
   Pieter


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685379#comment-16685379
 ] 

ASF GitHub Bot commented on CB-12035:
-

janpio commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-438310593
 
 
   Please leave an "Approve" review on the PR @terpro.
   
   In general someone has to come, understand and read through your PR 
@PieterVanPoyer, test and approve it, then merge. Later someone has to create a 
release of the plugin.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16685361#comment-16685361
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-438304327
 
 
   Hey @janpio can it be merged? Who can merge it?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16682569#comment-16682569
 ] 

ASF GitHub Bot commented on CB-12035:
-

janpio commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-437615452
 
 
   version is managed out of PRs in the release process.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16682566#comment-16682566
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-437615027
 
 
   Great testing!
   Should someone bump the version?
   From 2.0.2-dev to 2.1.0 or to 2.0.3 and publish it after merging?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-08 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16680745#comment-16680745
 ] 

ASF GitHub Bot commented on CB-12035:
-

terpro commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-437227407
 
 
   @janpio @PieterVanPoyer Tested and working as expected on Android 5, 7, 8, 
9, looks ready to merge


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-08 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16679500#comment-16679500
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-436930662
 
 
   @terpro  I followed your suggestion and introduced the Android Sdk version 
in the algorithm. So in case the sdk is below M - android the old behaviour is 
done.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676853#comment-16676853
 ] 

ASF GitHub Bot commented on CB-12035:
-

terpro commented on issue #74: [WIP] CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-436279058
 
 
   @PieterVanPoyer The changes you made originally fixed the issue for Android 
6+ devices, but broke anything below 6. Is it possible to just add an API 
level/Android version check and use the old or new code based on that?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676587#comment-16676587
 ] 

ASF GitHub Bot commented on CB-12035:
-

janpio commented on issue #74: [WIP] CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-436207859
 
 
   (I added `[WIP]` to the PR title to indicate that work on this is still 
ongoing. Just remove it when you have something that could and should be 
reviewed. Thanks.)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676418#comment-16676418
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-436185946
 
 
   Back to the drawing table. Tests on my Oreo and LG are not successfull.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16675490#comment-16675490
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435969778
 
 
   @terpro end @joewoodhouse  feel free to test it again. I rewrote it to use a 
networkCallback as suggested in the android documentation.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16675492#comment-16675492
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer edited a comment on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435969778
 
 
   @terpro end @joewoodhouse  feel free to test it again. I rewrote it to use a 
networkCallback as suggested in the android documentation.
   I will test it again tomorrow on my lollipop LG.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-02 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16673007#comment-16673007
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435354145
 
 
   I just stumbled on this one: 
https://stackoverflow.com/questions/29677852/connectivitymanager-extra-no-connectivity-is-always-false-on-android-lollipop
   My fix with using the EXTRA_NO_CONNECTIVITY flag does not work on lollipop. 
So, I need to make some adjustments.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672366#comment-16672366
 ] 

ASF GitHub Bot commented on CB-12035:
-

terpro commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435223254
 
 
   I just tested both the master and the pr on my Android 5.1 device. 
navigator.connection.type works as expected in both cases. However, the online 
and offline events _are not called_ in this pr, but _are_ in master.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672185#comment-16672185
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435185160
 
 
   Just to be sure. Is it working with the master version of the 
cordova-plugin-network-information?
   
   In production code, we do not rely on the online and offline events, we 
always read the: 
   `navigator.connection.type === Connection.NONE`
   to determine whether the device is online or offline.
   
   In my opinion this behaviour is not changed with this pull request.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672163#comment-16672163
 ] 

ASF GitHub Bot commented on CB-12035:
-

terpro commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435180364
 
 
   I don't have time to do extensive testing, but the online and offline events 
weren't being called


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672087#comment-16672087
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435163514
 
 
   @terpro what is not working? Can you give some reproduction steps for the 
Android 5 device? Is the connection reported falsy as 'none'?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671652#comment-16671652
 ] 

ASF GitHub Bot commented on CB-12035:
-

terpro commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435050646
 
 
   I tested this on my Android 5 device, didn't work. I only tested this PR 
version because that's what I'm using in my prod app, so I'm not sure if it's 
these changes specifically that prevent it from working.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671492#comment-16671492
 ] 

ASF GitHub Bot commented on CB-12035:
-

janpio commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435014952
 
 
   Did you test the change? Did it work? No side effects on older versions of 
Android?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-11-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671483#comment-16671483
 ] 

ASF GitHub Bot commented on CB-12035:
-

joewoodhouse commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-435010851
 
 
   Is anyone able to merge this?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-10-03 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637401#comment-16637401
 ] 

ASF GitHub Bot commented on CB-12035:
-

janpio commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-426764955
 
 
   No, for now there is not really anything you can do - someone will have to 
come along and review it. (I'm currently working on fixing test failures across 
all plugin PRs, so I am more than busy - and also don't know much about 
Android) You could of course spend some time reviewing and commenting on other 
PRs of this plugin or others - that might get you some karma  


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-10-03 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637396#comment-16637396
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-426763686
 
 
   @janpio Hey Jan, should I do anything more for this pull request (request a 
review, merge, ...)? Or do I leave it like it is.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-10-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16634526#comment-16634526
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer edited a comment on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-426035590
 
 
   I triggered a new build. (I did change some logging for a new commit).
   The travis build is now successfull!
   Are there any comments, questions, remarks for this pull request?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-10-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16634525#comment-16634525
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-426035590
 
 
   I triggered a new build. (I did change some logging for a new commit).
   Are there any comments, questions, remarks for this pull request?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-10-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16634506#comment-16634506
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer removed a comment on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-426029809
 
 
   @janpio Hey janpio, the travis-ci build keeps failing. Can I restart the 
travis build?  
   I 've seen that 
https://github.com/apache/cordova-plugin-media-capture/issues/105 is closed 
now. 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-10-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16634505#comment-16634505
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-426029809
 
 
   @janpio Hey janpio, the travis-ci build keeps failing. Can I restart the 
travis build?  
   I 've seen that 
https://github.com/apache/cordova-plugin-media-capture/issues/105 is closed 
now. 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-09-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629954#comment-16629954
 ] 

ASF GitHub Bot commented on CB-12035:
-

janpio commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-425009982
 
 
   Ok, failed again. The error message indicates that this is connnected to 
https://github.com/apache/cordova-cli/issues/339, which is currently actively 
being worked on. Expect a CLI 8.1.1 release that will fix the issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-09-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629943#comment-16629943
 ] 

ASF GitHub Bot commented on CB-12035:
-

janpio commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-425007878
 
 
   You can ignore the `platform=browser-safari` one, that is currently globally 
broken and we are investigating how and why in 
https://github.com/apache/cordova-plugin-media-capture/issues/105
   
   The other one was stalled, I restarted it. Let's see if this fixes it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-09-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629928#comment-16629928
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer commented on issue #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: 
https://github.com/apache/cordova-plugin-network-information/pull/74#issuecomment-425003724
 
 
   Hello,
   
   Can someone point me in the right direction why the build is failing.
   Seems like the ios builds are failing, but i haven't touched the ios code. 
   I did only change the Java file.
   
   Kind regards,
   Pieter


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-09-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629419#comment-16629419
 ] 

ASF GitHub Bot commented on CB-12035:
-

PieterVanPoyer opened a new pull request #74: CB-12035 (android) Fix bug 
[cordova-plugin-network-information] connection info is not reliable on Android 
6
URL: https://github.com/apache/cordova-plugin-network-information/pull/74
 
 
   https://issues.apache.org/jira/browse/CB-12035 && 
https://github.com/apache/cordova-plugin-network-information/issues/64: in case 
of TYPE_NONE (android bug?) return TYPE_UNKNOWN if 
ConnectivityManager.EXTRA_NO_CONNECTIVITY from the intent return false.
   
   
   
   ### Platforms affected
   android (6+)
   
   ### What does this PR do?
   There is an Android bug that returns a null activeNetworkInfo after idle 
time when there is a connection.
   This PR solves it by using the EXTRA_NO_CONNECTIVITY flag from the receiver 
Intent.
   In case the EXTRA_NO_CONNECTIVITY returns false, but the activeNetworkInfo 
is null, the network type is set to 'unknown'. (@see 
https://developer.android.com/reference/android/net/ConnectivityManager.html#EXTRA_NO_CONNECTIVITY
 )
   The receiver is also removed in the onPause and reattached in the onResume 
(this is not backwards compatible).
   
   ### What testing has been done on this change?
   Thoroughly testing on my Samsung device.
   An extract from my logging (type none, but switched to unknown because 'no 
connectivity' was false:
   `
   09-26 22:20:13.483 25806-25806/appId D/NetworkManager: Connection Type: none
   Connection Extra Info: null
   `
   `
   09-26 22:20:13.484 25806-25806/appId D/NetworkManager: Intent no 
connectivity: false
   !!! Switching to unknown
   `
   
   ### Checklist
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - [ ] Added automated test coverage as appropriate for this change.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails 

[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2018-02-13 Thread L Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16362857#comment-16362857
 ] 

L Hobbs commented on CB-12035:
--

This issue seems to be related to the "Doze" mode added to Android in version 
6.0, but has gotten much worse with Android 7.0 and 8.0. Reference 
https://issues.apache.org/jira/browse/CB-12325 for a way to reproduce the 
steps. I have been able to build a very, very simple project 
([https://github.com/tciwebdev/cordova-bug] ) in PhoneGap Build, which uses 
cli-6.5.0 (4.3.1 / 6.1.2 / 4.4.3), and cordova-plugin-network-information 
version 2.01. The only way I've seen to get the test app I built to report that 
the network is online is to either kill the app and relaunch it, or to disable 
data/force the phone in to airplane mode and back out while the app is running. 
 The only other option is to go into the phone settings and disable battery 
optimization for the app but that's something the user has to do on their 
device.

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>Priority: Major
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2017-11-30 Thread jakub-g (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16273528#comment-16273528
 ] 

jakub-g commented on CB-12035:
--

(OP here) I moved from cordova to native android dev some time ago, and we've 
noticed similar (not sure if the same) issues in our native code with 
connection status. I've noticed that when you receive network state changed 
event and in the callback you immediately query network for the information, it 
often lies to you and gives you the outdated info. We solved the problem by 
adding a small timeout before querying the detailed network info from the 
callback.

Maybe cordova plugin code could benefit from the same hack.

https://github.com/apache/cordova-plugin-network-information/blob/master/src/android/NetworkManager.java#L103-L113

Alternatively, maybe this line 

https://github.com/apache/cordova-plugin-network-information/blob/master/src/android/NetworkManager.java#L200

should say isConnectedOrConnecting() instead of isConnected(). I'm not sure, 
someone should have a look and try to debug it. Basically add some logs in this 
class, try going into airplane mode and back while connected to WiFi, and 
observe the logs. It should give you a clue what's wrong.

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2017-11-28 Thread Wandrille RONCE (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16268941#comment-16268941
 ] 

Wandrille RONCE commented on CB-12035:
--

Same issue with Android 7.0 and Samsung Galaxy S8+. The problem occure only 
with Wifi.
Sometimes, navigator.connection.type== none, even if Wifi is working well.

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2017-09-14 Thread Prashant Malik (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16165881#comment-16165881
 ] 

Prashant Malik commented on CB-12035:
-

Hi Everyone,

We are facing the same issue with our clients and i found that *network.js* 
code in function it's invoking the wrong event i.e _OFFLINE_ even though device 
is connected to the Wi-Fi. JS code is as follows:

{code:java}

netwrok.js: #59
channel.onCordovaReady.subscribe(function() {
me.getInfo(function(info) {*//info value is coming as none even-though 
device is connected to wi-fi*
me.type = info;
if (info === "none") {
// set a timer if still offline at the end of timer send the 
offline event
timerId = setTimeout(function(){
cordova.fireDocumentEvent("offline");
timerId = null;
}, timeout);
} else {
// If there is a current offline event pending clear it
if (timerId !== null) {
clearTimeout(timerId);
timerId = null;
}
cordova.fireDocumentEvent("online");
}

// should only fire this once
if (channel.onCordovaConnectionReady.state !== 2) {
channel.onCordovaConnectionReady.fire();
}
}
{code}

Any update on the solution or if anyone found the work around? Please suggest!!

Thanks & Regards
Prashant Malik

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-network-information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2017-02-20 Thread Jacques de Villiers (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874675#comment-15874675
 ] 

Jacques de Villiers commented on CB-12035:
--

Also just adding this issue in here, which is essentially a duplicate:
https://issues.apache.org/jira/browse/CB-12325

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Network Information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2017-02-20 Thread Jacques de Villiers (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874672#comment-15874672
 ] 

Jacques de Villiers commented on CB-12035:
--

Just to mention I had been on plugin version 1.2.1 for some time, and it was 
already on that version. I tried upgrading, but it did not make a difference.

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Network Information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2017-02-20 Thread Jacques de Villiers (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15874655#comment-15874655
 ] 

Jacques de Villiers commented on CB-12035:
--

I have experienced exactly the same issue, [~jakub-g] - how have you solved it 
in the meantime. It is so annoying.

I guess the best way to check is to add some conditionals that if it's Android 
6 + and it says offline, also check perhaps calling some endpoint to make sure 
whether a connection really does exist.

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Network Information
>Affects Versions: 1.3.0
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>  Labels: android
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12035) [cordova-plugin-network-information] connection info is not reliable on Android 6

2016-10-19 Thread jakub-g (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15588575#comment-15588575
 ] 

jakub-g commented on CB-12035:
--

The bug is reproducible with cordova-plugin-network-information@1.3.0 (latest)

> [cordova-plugin-network-information] connection info is not reliable on 
> Android 6
> -
>
> Key: CB-12035
> URL: https://issues.apache.org/jira/browse/CB-12035
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android
> Environment: Samsung Galaxy Edge S6 / Android 6
> useragent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G925F Build/MMB29K; wv) 
> AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 
> Mobile Safari/537.36"
> reproduced with:
> cordova-plugin-network-information@1.3.0 (latest)
> cordova-plugin-network-information@1.2.0
>Reporter: jakub-g
>
> I've noticed that information exposed by the plugin is not reliable. It 
> happens often that I'm connected to the internet via WiFi, and the plugin 
> says that there's no connection.
> It's not easy to reproduce it on-demand, but I reproduced it many times 
> recently. It happens most often when in the morning, I open the Cordova app 
> that was running in background throughout the night.
> Then, when I connect to Chrome Dev Tools, I can do a repl session like this:
> {code}
> > navigator.connection.type
> "none"
> > window.fetch('http://www.example.org').then(function(res) 
> > {console.log(res.status)})
> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
> 200
> Fetch complete: GET "http://www.example.org/;.(anonymous function)
> > navigator.connection.type
> "none"
> {code}
> So, the plugin thinks I'm offline, yet any HTTP calls done within the app 
> without checking if I'm offline or online, are successful (either from the 
> app or devtools).
> When I disable WiFi and reenable it, after a few seconds the plugin updates 
> its state and then it tells that connection type is "wifi".
> There are several possibilities here:
> - either system (or device driver) gives us incorrect information, or
> - cordova plugin is caching data and/or not listening properly to all the 
> events and/or incorrectly processing it
> and most probably the issue manifests itself when the device is asleep for 
> many hours (but I'm not sure about this).
> Note that I also noticed another issue, that sometimes the Chrome network 
> stack thinks I'm offline (when I do an HTTP call, it fails immediately and I 
> see network errors in devtools console) - and then I restart the Cordova app, 
> and everything's fine, all HTTP calls are ok - but this is unrelated to this 
> ticket, and perhaps a bug in Chrome.
> This ticket seems to be most likely a bug in the plugin, because as I said 
> before, doing HTTP call succeeds despite the plugin telling me that I'm 
> offline.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org