Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Security Sandbox - Error #2122

140 views
Skip to first unread message

nak5ive

unread,
Jun 5, 2007, 12:09:25 PM6/5/07
to
this is going to be a relatively common occurance for those interested in
dynamic drawing applications with AS3, specifically Spectrum.computeSpectrum().

i am no exception.

I have created a small jukebox in AS3 with a visualization using the
computeSpectrum() method. I at first was receiving sandbox violations
requesting a policy file before it would download the mp3 needed for playback.
I looked into this matter and found a solution to add a SoundLoaderContext
object to the Sound.load() method that told the sound object to check for a
policy file before downloading. here is my challenge:

i have a tab in firefox open to youtube, on a video's page. in another tab, my
website with jukebox (including visualization). when the jukebox attemps to
compute the spectrum, i receive Error #2122 (more specifically: SecurityError:
Error #2122: Security sandbox violation: SoundMixer.computeSpectrum:
http://kingthief.com/assets/flash/jukebox.swf cannot access
http://sjc-v28.sjc.youtube.com/get_video?video_id=iRHDuMkgZ10. A policy file is
required, but the checkPolicyFile flag was not set when this media was loaded.)

these warnings prevent spectrum from operating and jukebox functionality until
warning is dismissed.

my question: why would i get sandbox violations in the jukebox for a flash app
in a different website, in a different tab? i know that flash 9 is now a VM so
they must be inherently linked, but my warning indicates i'm trying to read a
policy file from a site it is not even connecting to (or requesting from)

i'm completely stumped. help?

dfm_

unread,
Nov 10, 2007, 9:25:13 AM11/10/07
to
no help can be seen in Adobe forums ;)

joeflashTO

unread,
Nov 12, 2007, 12:31:55 PM11/12/07
to
The Flash Player security sandbox can be quite a labyrinthian topic, which is
probably why this thread has remained unanswered. Check out chapter 19 of Colin
Moock's Essential ActionScript 3.0 book, he's done an excellent job of
explaining the security sandbox better than I've seen anywhere.

dfm_

unread,
Nov 13, 2007, 5:06:20 PM11/13/07
to
hi I have make solution for this error here to see it

[URL="http://theflashblog-bg.com/index.php?p=40"]http://theflashblog-bg.com/inde
x.php?p=40[/URL]
please be sure to change the language if is needed.

nak5ive

unread,
Nov 13, 2007, 7:17:29 PM11/13/07
to
dfm_
while i do appreciate the information on loading data across different
domains, it doesn't not solve this specific problem.

i will reiterate that i was receiving sandbox error #2122, but i was NOT
requesting data from an outside domain. all paths within my flash application
were relative. i simply had two firefox tabs open...one with my flash app in
it, and another on a youtube video page. Now, obviously it isn't specific to
youtube. the "other" tab could be pointed to any site with a media player
present and running on it.

i tried to further investigate this bug, but eventually abandoned using the
computeSpectrum() method all together.

is it a flash player bug? a firefox issue? i have no idea.

if the application is open and running by itself, it works like a charm. then
try to also have youtube running, refresh my app, and voila... sandbox
violation.

i have still found no help. i hope someone at adobe reads this and submits a
formal bug report.
very annoying.

Zachar...@gmail.com

unread,
Nov 20, 2007, 5:16:03 AM11/20/07
to
nak5ive
I have found exactly the same problem. I am also developing a jukebox,
with soundtransform and in the other firefox tab I had a google-video
open. I get exactly the same sandbox error problem, despite having all
my stuff in in relative links. Any suggestions on what to do?

The details:


"SecurityError: Error #2122: Security sandbox violation:

SoundMixer.computeSpectrum: http://www.testsite.com/myflash.swf cannot
access http://demos.immersivemedia.com/fvdemo_1/data/CylindricalFlashPlayerDemoSite/PopularMechanicsNYCDriveAlong/video.flv.


A policy file is required, but the checkPolicyFile flag was not set
when this media was loaded.

at flash.media::SoundMixer$/computeSpectrum()"

Explanatory note (for other readers trying to figure this out):
if you use soundtransform you need it to be accessing files in the
right security sandbox. if you access it in a subdirectory to your
own site, it is in the right sandbox. However, if you have another
flash-app open in another firefox-tab, these two will confuse each
other;s sandboxes. I believe this mixing up of info could be
considered a security issue, as this means I can potentially transfer
info from one flash app in one tab to another flash-app in another
tab..

0 new messages