title: Tizen Socket.io connection only works on 5.0
body: <p>So I have a problem where my app only runs on 5.0 simulator.
  Ive tested the app on 4.0 - 5.0 - 5.5 - &amp; 6.0.</p>
  <p>The project was first created on 5.0 but I then re-did it on v 4.0 but still the same problem.</p>
  <p>I'm thinking it has something to do with socket connection but why would it only work for 5.0?
  All I'm changing when testing is to choose a different emulator version.</p>
  <p>INDEX</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;utf-8&quot; /&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0, maximum-scale=1.0&quot;&gt;
      &lt;meta name=&quot;description&quot; content=&quot;Scheduled-countdown&quot;/&gt;
  
      &lt;title&gt;Scheduled-countdown&lt;/title&gt;
  
      &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/style.css&quot;/&gt;     
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class=container&gt;
      
      
      &lt;div class=centerContainer&gt;
          &lt;div id=ipInput style=&quot;height:100%&quot;&gt;
  &lt;!--            Storage key:
             &lt;input type=&quot;text&quot; id=&quot;storageKey&quot; style=&quot;width: 50px&quot;/&gt; --&gt;
             ipAdress:
             &lt;input type=&quot;text&quot; id=&quot;storageData&quot; style=&quot;width: 50%&quot;/&gt;
             &lt;input type=&quot;button&quot; id=&quot;save&quot; value=&quot;SAVE&quot; onclick=&quot;addStorage(); return false;&quot;/&gt;
             &lt;h1 id=&quot;ipAdress&quot;&gt;No Save ipAdress&lt;/h1&gt;
          &lt;/div&gt;
          
          
          
          &lt;div id=&quot;currentTime&quot;&gt;&lt;/div&gt;
          &lt;div id=&quot;title&quot;&gt;&lt;/div&gt;
          &lt;div id=&quot;time&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;  
  
  &lt;/body&gt;
  &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js&quot;&gt;&lt;/script&gt;
      &lt;script&gt;
            let countDownBool;
            let bgColor;
      
          var ipAdress = localStorage.getItem(localStorage.key(&quot;ipAdress&quot;))
          console.log(ipAdress)
          var ipString = `http://192.168.8.124:3000`
          console.log(ipString)
          ipAdress.textContent = localStorage.getItem(localStorage.key(&quot;ipAdress&quot;))
          
          
          const socket = io(ipString,{path: '/ws',});
          
          
          socket.on('connect', () =&gt; {
              console.log('SocketConnected!');
              document.getElementById(&quot;ipInput&quot;).style.display = &quot;none&quot;;
              
              
          });
          
          socket.on('message', (data) =&gt; {
              const { type, message } = data;
              //console.log(type);
              
              if (type == &quot;currentTime&quot;) {
                  document.getElementById(&quot;currentTime&quot;).textContent = message;
                  
                  if (countDownBool){
                      //style.display = &quot;block&quot;; style.display = &quot;none&quot;;
                      document.getElementById(&quot;currentTime&quot;).style.display = &quot;none&quot;;
                      document.getElementById(&quot;title&quot;).style.display = &quot;block&quot;;
                      document.getElementById(&quot;time&quot;).style.display = &quot;block&quot;;
                      
                  }else{
                      document.getElementById(&quot;currentTime&quot;).style.display = &quot;block&quot;;
                      document.getElementById(&quot;title&quot;).style.display = &quot;none&quot;;
                      document.getElementById(&quot;time&quot;).style.display = &quot;none&quot;;
                  }
                  //console.log(&quot;currentTime&quot;);
                  
              }
              
              if (type == &quot;countDown&quot;) {
                  document.getElementById(&quot;title&quot;).textContent = message.title;
                  document.getElementById(&quot;time&quot;).textContent = message.time;
                  
                  if(message.bool){
                      countDownBool = true;
                      
                      
                      if (message.countDownTimeInMS &gt; (-3*60000) &amp;&amp; message.countDownTimeInMS &lt; 0) {
                          bgColor = message.colors.countDownColor;
                      }else if(message.countDownTimeInMS &gt; 0){
                          bgColor = message.colors.countUpColor;
                      }
                      
                      //-------------------
                        if(message.countDownTimeInMS &gt; (-5*60000) &amp;&amp; message.countDownTimeInMS &lt; (-5*60000+1000)){
                        console.log(&quot;Vibrate 5&quot;);
                          navigator.vibrate([100, 100, 100, 100, 100, 100, 100, 100, 100, 100]);
                        }
                        if(message.countDownTimeInMS &gt; (-4*60000) &amp;&amp; message.countDownTimeInMS &lt; (-4*60000+1000)){
                        console.log(&quot;Vibrate 4&quot;);
                          navigator.vibrate([100, 100, 100, 100, 100, 100, 100, 100]);
                        }
                        if(message.countDownTimeInMS &gt; (-3*60000) &amp;&amp; message.countDownTimeInMS &lt; (-3*60000+1000)){
                        console.log(&quot;Vibrate 3&quot;);
                           navigator.vibrate([100, 100, 100, 100, 100, 100]);
                        }
                        if(message.countDownTimeInMS &gt; (-2*60000) &amp;&amp; message.countDownTimeInMS &lt; (-2*60000+1000)){
                        console.log(&quot;Vibrate 2&quot;);
                           navigator.vibrate([100, 100, 100, 100]);
                        }
                        if(message.countDownTimeInMS &gt; (-1*60000) &amp;&amp; message.countDownTimeInMS &lt; (-1*60000+1000)){
                        console.log(&quot;Vibrate 1&quot;);
                           navigator.vibrate([100, 100]);
                        }
                        if(message.countDownTimeInMS &gt; (0) &amp;&amp; message.countDownTimeInMS &lt; (0+1000)){
                        console.log(&quot;Vibrate START&quot;);
                           navigator.vibrate([1000, 100, 1000, 100]);
                        }
                      //-------------------
                      
                  }else{
                      countDownBool = false;
                      document.body.style.backgroundColor = &quot;2b2b2b&quot;;
                  }
      
              }
          });
          
      &lt;/script&gt;
      
      &lt;script&gt;
          function addStorage() {
              //var key = document.getElementById('storageKey');
              var key = &quot;ipAdress&quot;;
              var data = document.getElementById('storageData');
              
      
              /* Set the local storage item */
              if ('localStorage' in window) {
                  localStorage.setItem(key.value, data.value);
                  location.reload();
              } else {
                  alert('no localStorage in window');
              }
      
              /* Set the session storage item */
              if ('sessionStorage' in window) {
                  sessionStorage.setItem(key.value, data.value);
                  location.reload();
              } else {
                  alert('no sessionStorage in window');
              }
          }
      &lt;/script&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>CONFIG</p>
  <pre><code>S&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;widget xmlns=&quot;http://www.w3.org/ns/widgets&quot; xmlns:tizen=&quot;http://tizen.org/ns/widgets&quot; id=&quot;http://yourdomain/ScheduledCountdownTizen4&quot; version=&quot;1.0.0&quot; viewmodes=&quot;maximized&quot;&gt;
      &lt;access origin=&quot;https://cdnjs.cloudflare.com&quot; subdomains=&quot;true&quot;/&gt;
      &lt;tizen:application id=&quot;YGGUZsElLs.ScheduledCountdownTizen4&quot; package=&quot;YGGUZsElLs&quot; required_version=&quot;4.0&quot;/&gt;
      &lt;author href=&quot;https://github.com/mattehalen/Scheduled-countdown&quot; email=&quot;matte_halen@hotmail.com&quot;&gt;Mathias Halén&lt;/author&gt;
      &lt;tizen:background-category value=&quot;background-network&quot;/&gt;
      &lt;content src=&quot;index.html&quot;/&gt;
      &lt;feature name=&quot;http://tizen.org/feature/screen.size.all&quot;/&gt;
      &lt;icon src=&quot;icon.png&quot;/&gt;
      &lt;name&gt;ScheduledCountdownTizen4&lt;/name&gt;
      &lt;tizen:privilege name=&quot;http://tizen.org/privilege/internet&quot;/&gt;
      &lt;tizen:profile name=&quot;wearable&quot;/&gt;
      &lt;tizen:setting background-support=&quot;enable&quot; encryption=&quot;disable&quot; hwkey-event=&quot;enable&quot;/&gt;
  &lt;/widget&gt;
  </code></pre>