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

Cannot read property ‘software’ of undefined #348

Open
kokoshneta opened this issue Jan 21, 2020 · 3 comments
Open

Cannot read property ‘software’ of undefined #348

kokoshneta opened this issue Jan 21, 2020 · 3 comments

Comments

@kokoshneta
Copy link

I’m trying to get IEVMS installed on my Mac (macOS 10.14.6, VirtualBox 6.1.2). I’ve installed the VMBox Extension Pack as described in this thread to get around not being able to accept licence terms.

Now when I run curl -s https://raw.githubusercontent.com/amichaelparker/ievms/master/ievms-node.sh | env IEVMS_VERSIONS="11" bash (using @amichaelparker’s fork, I get the following:

Checking for VirtualBox
Checking for Oracle VM VirtualBox Extension Pack
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Building IE 11 VM
Checking for existing OVA at /Users/janus/.ievms/IE11 - Win81.ova
[eval]:1
JSON.parse(process.argv[1])[4].software[0].files[1].url
			       ^

TypeError: Cannot read property 'software' of undefined
	at [eval]:1:31
	at Script.runInThisContext (vm.js:126:20)
	at Object.runInThisContext (vm.js:316:38)
	at Object.<anonymous> ([eval]-wrapper:9:26)
	at Module._compile (internal/modules/cjs/loader.js:936:30)
	at evalScript (internal/process/execution.js:80:25)
	at internal/main/eval_string.js:23:3

I couldn’t find any previous issues here that deal with this, and I have no idea what the expected output of JSON.parse(process.argv[1]) is supposed to be, nor what key [4] in it is supposed to contain.

Any ideas what might be causing this and more importantly how to fix it?

@thisgeek
Copy link

I have the same issue. This repository shows strong signs of abandonware. I wouldn't expect any action on this issue here, and it doesn't seem like amichaelparker/ievms plans to accept issues. If anyone reading this can recommend another fork, I'm all ears.

@thisgeek
Copy link

thisgeek commented Jan 29, 2020

To answer your question, though, I have guesses.

I suspect the error you see pertains to https://github.com/amichaelparker/ievms/blob/master/ievms-node.sh#L304, in which case JSON.parse(process.argv[1]) just means parse the first argument as JSON. On that line the first argument is the result of curl -s https://developer.microsoft.com/en-us/microsoft-edge/api/tools/vms/.

Key [4] would select the 5th item of the list in that JSON. But if you look at what's returned by that curl as of today, you can see that the top level array has only one item:

[
  {
    "name": "Win10 with MsEdge",
    "software": [
      {
        "files": [
          {
            "name": "MSEdge.Win10.VirtualBox.zip",
            "url": "https://az792536.vo.msecnd.net/vms/VMBuild_20190311/VirtualBox/MSEdge/MSEdge.Win10.VirtualBox.zip",
            "md5": "https://az792536.vo.msecnd.net/vms/md5/VMBuild_20190311/MSEdge.Win10.VirtualBox.zip.md5.txt"
          }
        ],
        "name": "VirtualBox"
      },
      {
        "files": [
          {
            "name": "MSEdge.Win10.Vagrant.zip",
            "url": "https://az792536.vo.msecnd.net/vms/VMBuild_20190311/Vagrant/MSEdge/MSEdge.Win10.Vagrant.zip",
            "md5": "https://az792536.vo.msecnd.net/vms/md5/VMBuild_20190311/MSEdge.Win10.Vagrant.zip.md5.txt"
          }
        ],
        "name": "Vagrant"
      },
      {
        "files": [
          {
            "name": "MSEdge.Win10.HyperV.zip",
            "url": "https://az792536.vo.msecnd.net/vms/VMBuild_20190311/HyperV/MSEdge/MSEdge.Win10.HyperV.zip",
            "md5": "https://az792536.vo.msecnd.net/vms/md5/VMBuild_20190311/MSEdge.Win10.HyperV.zip.md5.txt"
          }
        ],
        "name": "HyperV (Windows)"
      },
      {
        "files": [
          {
            "name": "MSEdge.Win10.VMware.zip",
            "url": "https://az792536.vo.msecnd.net/vms/VMBuild_20190311/VMware/MSEdge/MSEdge.Win10.VMware.zip",
            "md5": "https://az792536.vo.msecnd.net/vms/md5/VMBuild_20190311/MSEdge.Win10.VMware.zip.md5.txt"
          }
        ],
        "name": "VMware (Windows, Mac)"
      },
      {
        "files": [
          {
            "name": "MSEdge.Win10.Parallels.zip",
            "url": "https://az792536.vo.msecnd.net/vms/VMBuild_20190311/Parallels/MSEdge/MSEdge.Win10.Parallels.zip",
            "md5": "https://az792536.vo.msecnd.net/vms/md5/VMBuild_20190311/MSEdge.Win10.Parallels.zip.md5.txt"
          }
        ],
        "name": "Parallels (Mac)"
      }
    ]
  }
]

So I suspect the schema of the JSON returned by this endpoint has wandered off from the form it used to have when ievms-node.sh was last updated.

This looks fixable to me. (I say that with some self-conscious naiveté.) I'll see if I can find some time to make an attempt.

@thisgeek
Copy link

I retract my earlier statement about fixing it. I was unable to find a published url for any VM other than for MSEdge. Back to guessing. I suspect without proof they've been pulled unannounced at the same time the new MSEdge was announced. The web archive may host some of the zips, though I don't imagine they're easy to find.

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