You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by paymicro <gi...@git.apache.org> on 2017/06/09 13:59:53 UTC

[GitHub] cordova-browser pull request #31: CB-12905: (linux) Fix issue with freezing ...

GitHub user paymicro opened a pull request:

    https://github.com/apache/cordova-browser/pull/31

    CB-12905: (linux) Fix issue with freezing after launching the browser

    In Linux, the callback is not called until the process terminates.
    If the error is not caused within 2 seconds, then the promise will be resolved.
    
    ### Platforms affected
    - Linux
    
    ### What does this PR do?
    - If the [error after launching the browser](https://github.com/Microsoft/cordova-simulate/issues/245) is not caused within 2 seconds, then the promise will be resolved. 
    
    ### What testing has been done on this change?
    - manual testing launching browsers in Linux, Windows and MacOs
    
    ### Checklist
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paymicro/cordova-browser Bugs/bug446896-simulate-in-linux

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-browser/pull/31.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #31
    
----
commit 17ca6c585afab25b68e868ecc0a13e55e803dc40
Author: Pavel Yakovlev (Akvelon) <v-...@microsoft.com>
Date:   2017-06-09T13:13:19Z

    In Linux, the callback is not called until the process terminates.
    If the error is not caused within 2 seconds, then the promise will be resolved.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-browser issue #31: CB-12905: (linux) Fix issue with freezing after l...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the issue:

    https://github.com/apache/cordova-browser/pull/31
  
    This needs to be addressed in the cordova-serve repo if it is an issue. Closing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-browser pull request #31: CB-12905: (linux) Fix issue with freezing ...

Posted by matrosov-nikita <gi...@git.apache.org>.
Github user matrosov-nikita commented on a diff in the pull request:

    https://github.com/apache/cordova-browser/pull/31#discussion_r121171609
  
    --- Diff: node_modules/cordova-serve/src/exec.js ---
    @@ -29,7 +29,15 @@ var child_process = require('child_process'),
     module.exports = function (cmd, opt_cwd) {
         var d = Q.defer();
         try {
    +        // In Linux, the callback is not called until the process terminates.
    +        // If the error is not caused within 2 seconds, then the promise will be resolved.
    +        var timer = setTimeout(() => {
    +            if (process.platform == 'linux') {
    --- End diff --
    
    use `===` instead of `==`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-browser pull request #31: CB-12905: (linux) Fix issue with freezing ...

Posted by matrosov-nikita <gi...@git.apache.org>.
Github user matrosov-nikita commented on a diff in the pull request:

    https://github.com/apache/cordova-browser/pull/31#discussion_r121171521
  
    --- Diff: node_modules/cordova-serve/src/exec.js ---
    @@ -29,7 +29,15 @@ var child_process = require('child_process'),
     module.exports = function (cmd, opt_cwd) {
         var d = Q.defer();
         try {
    +        // In Linux, the callback is not called until the process terminates.
    +        // If the error is not caused within 2 seconds, then the promise will be resolved.
    +        var timer = setTimeout(() => {
    --- End diff --
    
    Should we call `setTimeout` for Windows and OSX?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-browser pull request #31: CB-12905: (linux) Fix issue with freezing ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-browser/pull/31


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-browser issue #31: CB-12905: (linux) Fix issue with freezing after l...

Posted by matrosov-nikita <gi...@git.apache.org>.
Github user matrosov-nikita commented on the issue:

    https://github.com/apache/cordova-browser/pull/31
  
    Also, I think you need to send this PR in the cordova-serve (https://github.com/apache/cordova-serve)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-browser pull request #31: CB-12905: (linux) Fix issue with freezing ...

Posted by matrosov-nikita <gi...@git.apache.org>.
Github user matrosov-nikita commented on a diff in the pull request:

    https://github.com/apache/cordova-browser/pull/31#discussion_r121171981
  
    --- Diff: node_modules/cordova-serve/src/exec.js ---
    @@ -29,7 +29,15 @@ var child_process = require('child_process'),
     module.exports = function (cmd, opt_cwd) {
         var d = Q.defer();
         try {
    +        // In Linux, the callback is not called until the process terminates.
    +        // If the error is not caused within 2 seconds, then the promise will be resolved.
    +        var timer = setTimeout(() => {
    +            if (process.platform == 'linux') {
    +                d.resolve('timeout');
    +            }
    +        }, 2000);
             child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000}, function (err, stdout, stderr) {
    --- End diff --
    
    Were you able to figure out why callback is not called?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org