• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Trading module

Scheduled Pinned Locked Moved Requests
25 Posts 4 Posters 14.2k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    alexyak
    last edited by Aug 14, 2016, 12:15 AM

    Alright I’ve just published it. Enjoy: :)

    https://forum.magicmirror.builders/topic/496/stocks

    1 Reply Last reply Reply Quote 0
    • P Offline
      plumcraft
      last edited by Aug 17, 2016, 4:34 PM

      I got an error when trying your module :

      stocks.js:110 GET http://finance.google.com/finance/info?client=ig&q=.DJI,MSFT,AAPL,GOOG,INTC,CICS,TSLA,FB getStocks @ stocks.js:110start @ stocks.js:19startModules @ loader.js:55(anonymous function) @ loader.js:40stylesheet.onload @ loader.js:190
      192.168.0.31/:1 XMLHttpRequest cannot load http://finance.google.com/finance/info?client=ig&q=.DJI,MSFT,AAPL,GOOG,INTC,CICS,TSLA,FB. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://192.168.0.31:8080’ is therefore not allowed access. The response had HTTP status code 500.

      It might be a configuration issue on my side ?

      Thanks

      A 1 Reply Last reply Aug 17, 2016, 4:41 PM Reply Quote 0
      • A Offline
        alexyak @plumcraft
        last edited by Aug 17, 2016, 4:41 PM

        @plumcraft Hmm… that’s strange why you’re getting the CORS error. It works for me directly from the chromium… Where’re you running it from?

        1 Reply Last reply Reply Quote 0
        • P Offline
          plumcraft
          last edited by Aug 17, 2016, 4:49 PM

          @alexyak : I’m testing it from a remote computer and directly on my RPI , and same issue…, don’t get it :(

          A 1 Reply Last reply Aug 17, 2016, 5:25 PM Reply Quote 0
          • A Offline
            alexyak
            last edited by Aug 17, 2016, 4:52 PM

            ok then the easiest solution would be to move this call to the node_helper…

            1 Reply Last reply Reply Quote 0
            • A Offline
              alexyak @plumcraft
              last edited by Aug 17, 2016, 5:25 PM

              @plumcraft Ok, I found a bug in the code. Try to pull the latest and see if it runs for you.

              1 Reply Last reply Reply Quote 0
              • P Offline
                plumcraft
                last edited by Aug 17, 2016, 5:54 PM

                @alexyak : thanks for your quick reply but no luck with the latest pull

                1 Reply Last reply Reply Quote 0
                • P Offline
                  plumcraft
                  last edited by Aug 17, 2016, 6:11 PM

                  I’ve tried to enable Cors which looks like the issue here but does not make any difference

                  (I’ve followed instructions on this website : http://jonathanmh.com/how-to-enable-cors-in-express-js-node-js/)

                  A 1 Reply Last reply Aug 17, 2016, 7:30 PM Reply Quote 0
                  • A Offline
                    alexyak @plumcraft
                    last edited by Aug 17, 2016, 7:30 PM

                    @plumcraft could you please try the following:

                    Update the electron.js (it’s in the \js\ folder). Instead of:

                    mainWindow = new BrowserWindow({width: 800, height: 600,  fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false}});
                    

                    Replace it with:

                    mainWindow = new BrowserWindow({width: 800, height: 600,  fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false, webSecurity: false}});
                    
                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      plumcraft
                      last edited by Aug 17, 2016, 8:19 PM

                      @alexyak,

                      My bad Alexyak, it was working even if webSecurity was not set. It was an issue in my config.js, sorry for that.

                      Your module is working only on the RPI, not inside a browser (webSecurity: false or true) but it’s not a big deal.

                      I will try to find a solution

                      A 1 Reply Last reply Aug 17, 2016, 9:26 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        10/25
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy