Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

cross origin frame error (CORS?) #147

Open
dcsan opened this issue Apr 1, 2015 · 4 comments
Open

cross origin frame error (CORS?) #147

dcsan opened this issue Apr 1, 2015 · 4 comments

Comments

@dcsan
Copy link

dcsan commented Apr 1, 2015

I'm getting this with meteor 1.1

image

however the "Mocha iframe" will display just fine...

any ideas?

@dcsan
Copy link
Author

dcsan commented Apr 1, 2015

when i run the testing from CLI i get varying results - sometimes runs and sometimes doesn't.


➜  chatu git:(tests-breaking) ✗ cat bin/velo-test.sh 
#!/usr/bin/env bash
cd app
meteor --test --settings private/config/local.json


➜  chatu git:(tests-breaking) ✗ bin/velo-test.sh 
stream error Network error: ws://localhost:3000/websocket: connect ECONNREFUSED
-- PubSubMan.usepackages                     \
-- cards.useing packages                     \
-- chatabox.use packages                     \
-- airtable.use packages                     |
-- Inbox.useing packages                     |
-- layout.on_usepackages                     |
-- pairs.on_use packages                     |
-- pairs.on_use packages                     |
-- Storybot.use packages                     |
-- Trix.on_useg packages                     |
I20150401-12:18:57.916(-7)? PubSubMan.init    
I20150401-12:18:57.918(-7)? publishing
I20150401-12:18:57.919(-7)? makeExportable Chatrooms
I20150401-12:18:58.009(-7)? _setup stories
I20150401-12:18:58.009(-7)? parse appRoutes
I20150401-12:18:58.009(-7)? create server routes
I20150401-12:18:58.718(-7)? lessonByName { deleted: { '$ne': true }, cname: 'about' } count: 1
I20150401-12:18:58.726(-7)? chatroomByName { deleted: { '$ne': true }, cname: 'about' } count: 1
I20150401-12:18:58.730(-7)? sub PlayerTasks { story: 'about' }
I20150401-12:18:58.730(-7)? Player.tasks find ok { story: 'about' }
PASSED mocha : start here:Lessons => is accessible in the list of lessons
FAILED mocha : start here:Lessons => contains the button 'next'
Error: Uncaught SecurityError: Blocked a frame with origin "http://localhost:5000" from accessing a cross-origin frame. (http://localhost:5000/packages/mike_mocha.js?81e347a16dc440779b8caa4163b6179df74c6bfc:10145)
    at global.onerror (http://localhost:5000/packages/mike_mocha.js?81e347a16dc440779b8caa4163b6179df74c6bfc:5774:10)
FAILED mocha : start here:Lessons => Jenny appears after click on 'next'
Error: Uncaught SecurityError: Blocked a frame with origin "http://localhost:5000" from accessing a cross-origin frame. (http://localhost:5000/packages/mike_mocha.js?81e347a16dc440779b8caa4163b6179df74c6bfc:10145)
    at global.onerror (http://localhost:5000/packages/mike_mocha.js?81e347a16dc440779b8caa4163b6179df74c6bfc:5774:10)
FAILURE
➜  chatu git:(tests-breaking) ✗ bin/velo-test.sh
stream error Network error: ws://localhost:3000/websocket: connect ECONNREFUSED
-- PubSubMan.use                             \
-- cards.use                                 \
-- chatabox.use packages                     \
-- airtable.use packages                     |
-- Inbox.useing packages                     |
-- layout.on_usepackages                     |
-- pairs.on_use packages                     |
-- pairs.on_use packages                     |
-- Storybot.use packages                     |
-- Trix.on_useg packages                     |
I20150401-12:19:46.183(-7)? PubSubMan.init    
I20150401-12:19:46.184(-7)? publishing
I20150401-12:19:46.184(-7)? makeExportable Chatrooms
I20150401-12:19:46.264(-7)? _setup stories
I20150401-12:19:46.264(-7)? parse appRoutes
I20150401-12:19:46.264(-7)? create server routes
PASSED mocha : start here:Lessons => is accessible in the list of lessons
I20150401-12:19:53.835(-7)? lessonByName { deleted: { '$ne': true }, cname: 'about' } count: 1
I20150401-12:19:53.838(-7)? chatroomByName { deleted: { '$ne': true }, cname: 'about' } count: 1
I20150401-12:19:53.855(-7)? sub PlayerTasks { story: 'about' }
I20150401-12:19:53.855(-7)? Player.tasks find ok { story: 'about' }
FAILED mocha : start here:Lessons => contains the button 'next'
undefined
FAILED mocha : start here:Lessons => Jenny appears after click on 'next'
undefined
FAILURE

@rissem
Copy link
Collaborator

rissem commented Apr 1, 2015

Hmm possibly a race condition reporting to the parent process?

Could you include a list of packages that your app uses? Or even more awesome would be a reproduction repo.

@dcsan
Copy link
Author

dcsan commented Apr 2, 2015

hi -

Could you include a list of packages that your app uses?

there's a fair number of packages in the app, listed below

Or even more awesome would be a reproduction repo.

I could open up the private repo to you if that would help, but that's a bit too much to ask of you.

➜  chatu git:(tests) cat app/.meteor/versions
[email protected]
[email protected]
aldeed:[email protected]
aldeed:[email protected]
aldeed:[email protected]
[email protected]
[email protected]
babrahams:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
chatu:[email protected]
chatu:[email protected]
[email protected]
[email protected]
dburles:[email protected]
dburles:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]_6
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
dcsan:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
fortawesome:[email protected]
fourseven:[email protected]_5
[email protected]
gwendall:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
iron:[email protected]
[email protected]_2
[email protected]
lai:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteoric:[email protected]
meteoric:[email protected]
meteortoys:[email protected]
mike:[email protected]
[email protected]
[email protected]
[email protected]
momentjs:[email protected]
[email protected]
[email protected]
mquandalle:[email protected]
msavin:[email protected]
natestrauser:[email protected]
[email protected]_2
[email protected]
[email protected]
[email protected]
pcel:[email protected]
practicalmeteor:[email protected]_3
practicalmeteor:[email protected]_3
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
sergeyt:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
udondan:[email protected]_1
[email protected]
[email protected]
[email protected]
velocity:[email protected]
velocity:[email protected]
velocity:[email protected]
velocity:[email protected]
velocity:[email protected]
velocityjs:[email protected]
[email protected]
[email protected]

@dcsan
Copy link
Author

dcsan commented Apr 2, 2015

it looks like the ordering is different on each of those test runs. I do have some debug in there to tell what's happening.

the start of the tests does have some code to load up data, which can take a while
but the format looks fine i think:

MochaWeb?.testOnly ->
  describe "Lessons", ->
    before (done)->
      @timeout(20000)
      Meteor.call 'reloadAll', ->
        done()

    describe "start here", ->
      it "is accessible in the list of lessons", (done)->

        # setTimeout ->
        #   $('a[href="/lessons"]').click()
        #   setTimeout ->
        #     console.log($('.imageBox'))
        #     chai.assert.equal($('.imageBox > .title.item-text-wrap:contains("Start here")').length, 1)
        #     done()
        #   , 100
        # , 100

        chai.assert.lengthOf($('a[href="/lessons"]'), 1, "there is Lessons link")
        $('a[href="/lessons"]').click()
        setTimeout ->
          chai.assert.lengthOf($('.imageBox > .title.item-text-wrap:contains("Start here")'), 1, "there is 'Start here' button")
          done()
        , 100

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

No branches or pull requests

2 participants