Uncaught (in promise) DOMException: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': Tainted canvases may not be loaded · Ask ...
Home
Public
Questions
Tags
Users
Companies
Collectives
ExploreCollectives
Teams
StackOverflowforTeams
–Startcollaboratingandsharingorganizationalknowledge.
CreateafreeTeam
WhyTeams?
Teams
CreatefreeTeam
Collectives™onStackOverflow
Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost.
LearnmoreaboutCollectives
Teams
Q&Aforwork
Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch.
LearnmoreaboutTeams
Uncaught(inpromise)DOMException:Failedtoexecute'texImage2D'on'WebGL2RenderingContext':Taintedcanvasesmaynotbeloaded
AskQuestion
Asked
2years,9monthsago
Modified
1year,10monthsago
Viewed
8ktimes
8
0
'''
'''
AboveishtmlfileusingwhichIamtryingoutposenetfromtensorflowjs.
FollowingistheerrorwhichIreceivedwhenItriedtoopentheabovefileingooglechrome.
Uncaught(inpromise)DOMException:Failedtoexecute'texImage2D'on'WebGL2RenderingContext':Taintedcanvasesmaynotbeloaded.
athttps://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:176404
atqt(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:55726)
atvi(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:176377)
att.uploadPixelDataToTexture(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:181200)
atObject.kernelFunc(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:480876)
ath(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:42226)
athttps://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:42907
att.scopedRun(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:40845)
att.runKernelFunc(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:42726)
att.runKernel(https://cdn.jsdelivr.net/npm/@tensorflow/tfjs:2:41280)
Followingistheerrorwhenthehtmlfileisopenedinfirefox
'''
SecurityError:Theoperationisinsecure.
Sourcemaperror:Error:requestfailedwithstatus404
ResourceURL:https://cdn.jsdelivr.net/npm/@tensorflow/tfjs
SourceMapURL:tf.min.js.map
'''
IamabeginnerandIamnotabletounderstandtheaboveerror.IamtryingtogettheposecoordinatesfromtheconsoleinthebrowserbutIjustkeepgettingthiserror.
Anyhelpwouldbeappreciatedandthanksinadvance.
javascripthtmlgoogle-chromefirefoxtensorflow.js
Share
Follow
editedJan4,2020at6:02
Bharat_K
askedJan3,2020at11:01
Bharat_KBharat_K
17611silverbadge1111bronzebadges
Addacomment
|
2Answers
2
Sortedby:
Resettodefault
Highestscore(default)
Trending(recentvotescountmore)
Datemodified(newestfirst)
Datecreated(oldestfirst)
21
crossorigin='anonymous'needstobeaddedtotheimagetag
Touseanimagelocally,theimageneedstobeservedbyaserverallowingcors.http-servercanbeusedwiththecommandline
http-server-c1--cors.
Share
Follow
editedOct21,2020at18:53
QuentinRoy
7,34122goldbadges3030silverbadges5050bronzebadges
answeredJan4,2020at12:26
edkevekededkeveked
17.1k88goldbadges5252silverbadges8888bronzebadges
5
1
Doyoustillhavethesameerrorwhenusingthecrossoriginattribute?
– edkeveked
Jan6,2020at10:33
Thankyouverymuchforyourresponse.CodegivenbyyouworksfinebutIneedtouseaimagewhichislocalinmysystem.Canyousuggestmehowtotoit.
– Bharat_K
Jan6,2020at10:34
1
Locally,youwillneedtoservetheimagebyaserverandallowcors
– edkeveked
Jan6,2020at11:21
1
Thankyouverymuch.NowIamabletousemylocalimages.Everythingworksjustfine.
– Bharat_K
Jan8,2020at4:31
1
Howtomodifytheabovecodetouseawebcamvideoinsteadofaimage.ThedemocodefromgithubposenetrepoistoocomplexandIdonotrequireallthosefeatures.
– Bharat_K
Mar10,2020at3:29
Addacomment
|
-1
Iwashavingthesameproblemwithmyreactappandtensorflow.jsbutionlyrealisedthatiwasmissingthecrossOriginproporattributeasedkevekedmentioned.SoisolvedmyproblembymodifyingtheimgtagandputtheattributeorpropertycrossOriginasfollows:
edkeveked'sansweristhebest
Goodluck✔✔✨✨
Share
Follow
answeredNov22,2020at4:53
crispengaricrispengari
6,00944goldbadges3434silverbadges3838bronzebadges
Addacomment
|
YourAnswer
ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers.
Draftsaved
Draftdiscarded
Signuporlogin
SignupusingGoogle
SignupusingFacebook
SignupusingEmailandPassword
Submit
Postasaguest
Name
Email
Required,butnevershown
PostYourAnswer
Discard
Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy
Nottheansweryou'relookingfor?Browseotherquestionstaggedjavascripthtmlgoogle-chromefirefoxtensorflow.jsoraskyourownquestion.
TheOverflowBlog
MeetSaves:thetooltohelpyouorganizeyourfavoritecontentonStack...
MeettheAIhelpingyouchoosewhattowatchnext
FeaturedonMeta
BookmarkshaveevolvedintoSaves(temporarilydisabled)
Recentcolorcontrastchangesandaccessibilityupdates
Revieweroverboard!Orarequesttoimprovetheonboardingguidancefornew...
CollectivesUpdate:RecognizedMembers,Articles,andGitLab
The[placement]tagisbeingburninated
ShouldIexplainotherpeople'scode-onlyanswers?
Linked
2
Failedtoexecute'texImage2D'on'WebGL2RenderingContext'.Accesstoimageat'imageurl.com'fromorigin'exampale.com'hasbeenblockedbyCORS
Related
275
Taintedcanvasesmaynotbeexported
6
WhyamIgettingtheerror"tf.fromPixelsisnotafunction"?
1
Usingtensorflowjsinchromeextensions
0
Howtoimportmodulesorexternal.jsfilesinnode.js
102
HowcanIfixthe"DevToolsfailedtoloadSourceMap:Couldnotloadcontent"errorwhenaddingaJavaScriptlibrary?
2
Failedtoexecute'texImage2D'on'WebGL2RenderingContext'.Accesstoimageat'imageurl.com'fromorigin'exampale.com'hasbeenblockedbyCORS
1
HTML2canvasinofflineversion-Taintedcanvasesmaynotbeexported
0
ErrorrunningtfjsBlazePoseposedetectiononsingleHTMLImageElement
HotNetworkQuestions
Howtodisplaymorethanthreebuttons?
CanIconnecthomemadebatterypacksinparallel?
WhereisTransferattributein3.4?
HowwouldImanipulatethisrecipe(oranother)tomakeJägerBombflavouredmacarons?
HowdidpeoplegetappsontheircomputerbeforetheInternet?
Whydoheavilyobject-orientedlanguagesavoidhavingfunctionsasaprimitivetype?
Whydoesn'tlawtakeintoaccountprobability?
Howtostartafunctionautomaticallyaftercertainperiodoftime?
CanIgetawaywithloweringgravitysothattheusualsolarmassesinouruniversearesimplyplanetarymassesinthesetting'suniverse?
HowcanIhelpplayerswhohavetroubleinterjectingintoconversationsandroleplaying?
Thecomputercan'tdoanythingIcouldn'tdowithpenandpaper
ComparingdifferentGAMsusingAICwhenthemodelswerefittedusing"method=REML"inmgcv
DoesSanFranciscoandCalifornialawhavejurisdictioninthePresidioofSanFrancisco?
Addingbakingpowdertowetinsteadofdrydidn'twork.Whynot?
HowdoIviewthebuilt-indefinitionofTemplateBoxstylesintermsoflowlevelboxes?
InPOSIXscripting,isx=$yalwaysequivalenttox="$y"?
WhoweretheattackersofGlensFalls?(TheLastoftheMohicans)
HowdoesThespian'sStageworkwithSpreadingSeas?
What'sthevaluetoberealizedina'teamworkagreement'?
HowwasthefirstreleaseofJava(JDK1.0)used?
WeretheStarlinkunitsforUkrainenotpaidbyMusk?
IsitstillpossibletoplayOverwatchorareweforcedtouseOverwatch2?
Apostapocalypticstoryaboutafatheranddaughterwhosurviveanalienattackthatwipesouthumanity
DoesGiftoftheEver-LivingOnesmaximizethedamageand/orhealingfromGlovesofSoulCatching?
morehotquestions
Questionfeed
SubscribetoRSS
Questionfeed
TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader.
default
Yourprivacy
Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy.
Acceptallcookies
Customizesettings