René's URL Explorer Experiment


Title: Incorrectly parsing code · Issue #38 · stacktracejs/error-stack-parser · GitHub

Open Graph Title: Incorrectly parsing code · Issue #38 · stacktracejs/error-stack-parser

X Title: Incorrectly parsing code · Issue #38 · stacktracejs/error-stack-parser

Description: @tarr11 commented on Mon Jun 12 2017 I am using Function to parse and eval some code in the browser. I would like to use StackTraceJS to show errors to my users in the code editor. My code is minified using Webpack/Uglify, but user code ...

Open Graph Description: @tarr11 commented on Mon Jun 12 2017 I am using Function to parse and eval some code in the browser. I would like to use StackTraceJS to show errors to my users in the code editor. My code is minif...

X Description: @tarr11 commented on Mon Jun 12 2017 I am using Function to parse and eval some code in the browser. I would like to use StackTraceJS to show errors to my users in the code editor. My code is minif...

Opengraph URL: https://github.com/stacktracejs/error-stack-parser/issues/38

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrectly parsing code","articleBody":"@tarr11 commented on [Mon Jun 12 2017](https://github.com/stacktracejs/stacktrace.js/issues/194)\n\n\u003c!--- Provide a general summary of the issue in the Title above --\u003e\r\nI am using `Function` to parse and eval some code in the browser.  I would like to use StackTraceJS to show errors to my users in the code editor.   My code is minified using Webpack/Uglify, but user code is not.  User code is executed in a sandboxed iframe.  \r\n\r\n## Expected Behavior\r\nI expect that StackFrameJS should parse \"anonymous\" errors correctly.\r\n\r\n## Current Behavior\r\nStackFrameJS does not parse anonymous errors like below, nor return the correct line number.\r\n\r\nSample User Code (should throw an error):\r\n![image](https://user-images.githubusercontent.com/369807/27046674-2e7b439e-4f5a-11e7-9498-749fc568d38f.png)\r\n\r\nMy code is executed like this\r\n```\r\n    let runFunction = function (p) {\r\n      let f = null;\r\n      try {\r\n        f = Function(\"p\", code)\r\n        f(p);\r\n      } catch (error) {\r\n          StackTrace.fromError(error).then(sr =\u003e {\r\n          window.parent.postMessage({sr, type: \"err\"}, \"*\");\r\n        })\r\n\r\n      }\r\n    }\r\n   // call runFunction\r\n  runFunction(...);\r\n```\r\n\r\nThe stack trace looks like this (in Chrome)\r\n```\r\nReferenceError: hi is not defined\r\n    at eval (eval at runFunction (http://localhost:8080/packs/iframe.js:5669:21), \u003canonymous\u003e:4:9)\r\n    at runFunction (http://localhost:8080/packs/iframe.js:5670:17)\r\n    at e.Sketch.sketch.attachFunction (http://localhost:8080/packs/iframe.js:5722:17)\r\n    at e.Sketch.attach (eval at webpackJsonp.679.module.exports (http://localhost:8080/packs/iframe.js:11868:8), \u003canonymous\u003e:43:267)\r\n    at Ir (eval at webpackJsonp.679.module.exports (http://localhost:8080/packs/iframe.js:11868:8), \u003canonymous\u003e:1417:89)\r\n    at eval (eval at webpackJsonp.679.module.exports (http://localhost:8080/packs/iframe.js:11868:8), \u003canonymous\u003e:1415:106)\"\r\n```\r\n\r\nThe parsed stack trace looks like this (first line)\r\n![image](https://user-images.githubusercontent.com/369807/27046606-f1193394-4f59-11e7-8c0a-0e7baa0c1cc2.png)\r\n\r\n\r\n\r\n## Steps to Reproduce (for bugs)\r\n\r\n## Context\r\n\u003c!--- How has this issue affected you? What are you trying to accomplish? --\u003e\r\nI am trying to use StackTrace to parse and show JS errors to a user in a browser editor (Monaco)\r\n\r\n## Your Environment\r\n\u003c!--- Include as many relevant details about the environment you experienced the bug in --\u003e\r\n* stacktrace.js version: 2.0\r\n* Browser Name and version: Chrome 58\r\n* Operating System and version (desktop or mobile): OS X Sierra 10.12.5\r\n\r\n\r\n## Possible Solution\r\nSuggest improving the parser to handle nested / anonymous stack traces\r\n\n\n---\n\n@eriwen commented on [Sat Aug 12 2017](https://github.com/stacktracejs/stacktrace.js/issues/194#issuecomment-322003767)\n\nThanks for the issue. Error parsing is done in `error-stack-parser`, so I'm moving the issue to that project.\n\n","author":{"url":"https://github.com/eriwen","@type":"Person","name":"eriwen"},"datePublished":"2017-08-12T20:24:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/38/error-stack-parser/issues/38"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:afece30e-772b-570d-639f-75682d0a3f1a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCEAA:3B75B9:6B23CB:966F6F:696F3CA9
html-safe-nonce776e3b0e70b2075e9bf86ff57b6282c32ab3b7cb528b6edecde1d0612f69651f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUFBOjNCNzVCOTo2QjIzQ0I6OTY2RjZGOjY5NkYzQ0E5IiwidmlzaXRvcl9pZCI6IjQ2OTI2ODg4OTcyNDA0MTU0MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7b33697d8ff9987807585e52ff422d39fb08b5d759514e0a5624d1a2eac30856
hovercard-subject-tagissue:249833471
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stacktracejs/error-stack-parser/38/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5cc68ed0cb43e2fee052db9876f7b6723a6b7ee68d793f2e430b348a52246e89/stacktracejs/error-stack-parser/issues/38
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5cc68ed0cb43e2fee052db9876f7b6723a6b7ee68d793f2e430b348a52246e89/stacktracejs/error-stack-parser/issues/38
og:image:alt@tarr11 commented on Mon Jun 12 2017 I am using Function to parse and eval some code in the browser. I would like to use StackTraceJS to show errors to my users in the code editor. My code is minif...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameeriwen
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
turbo-cache-controlno-preview
go-importgithub.com/stacktracejs/error-stack-parser git https://github.com/stacktracejs/error-stack-parser.git
octolytics-dimension-user_id6131251
octolytics-dimension-user_loginstacktracejs
octolytics-dimension-repository_id15014773
octolytics-dimension-repository_nwostacktracejs/error-stack-parser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id15014773
octolytics-dimension-repository_network_root_nwostacktracejs/error-stack-parser
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/38#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstacktracejs%2Ferror-stack-parser%2Fissues%2F38
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstacktracejs%2Ferror-stack-parser%2Fissues%2F38
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=stacktracejs%2Ferror-stack-parser
Reloadhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/38
Reloadhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/38
Reloadhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/38
stacktracejs https://patch-diff.githubusercontent.com/stacktracejs
error-stack-parserhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fstacktracejs%2Ferror-stack-parser
Fork 51 https://patch-diff.githubusercontent.com/login?return_to=%2Fstacktracejs%2Ferror-stack-parser
Star 483 https://patch-diff.githubusercontent.com/login?return_to=%2Fstacktracejs%2Ferror-stack-parser
Code https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser
Issues 14 https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues
Pull requests 9 https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulls
Actions https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/actions
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/security
Please reload this pagehttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/38
Insights https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulse
Code https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser
Issues https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues
Pull requests https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulls
Actions https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/actions
Security https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/security
Insights https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/stacktracejs/error-stack-parser/issues/38
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/stacktracejs/error-stack-parser/issues/38
Incorrectly parsing codehttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/38#top
https://github.com/eriwen
https://github.com/eriwen
eriwenhttps://github.com/eriwen
on Aug 12, 2017https://github.com/stacktracejs/error-stack-parser/issues/38#issue-249833471
@tarr11https://github.com/tarr11
Mon Jun 12 2017https://github.com/stacktracejs/stacktrace.js/issues/194
https://user-images.githubusercontent.com/369807/27046674-2e7b439e-4f5a-11e7-9498-749fc568d38f.png
https://user-images.githubusercontent.com/369807/27046606-f1193394-4f59-11e7-8c0a-0e7baa0c1cc2.png
@eriwenhttps://github.com/eriwen
Sat Aug 12 2017https://github.com/stacktracejs/stacktrace.js/issues/194#issuecomment-322003767
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.