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

Microsoft JScript compilation error 800A03EE. #44

Open
hooty668 opened this issue Jan 3, 2018 · 36 comments
Open

Microsoft JScript compilation error 800A03EE. #44

hooty668 opened this issue Jan 3, 2018 · 36 comments

Comments

@hooty668
Copy link

hooty668 commented Jan 3, 2018

I had an error when opening the app. it seems to have trouble running json2.js. This line in particular:
j = eval('(' + text + ')');
i ran the example and everything was fine. Any ideas on what is happening?

image

@hooty668
Copy link
Author

hooty668 commented Jan 4, 2018

It looks like when i print '(' + text + ')' i get:

image

Which seems as though it is duplicating.

@Dripdrop12
Copy link
Member

I've seen that error on older versions of Windows. Can you run Sys.info() and provide the results here? Thanks!

@hooty668
Copy link
Author

hooty668 commented Jan 5, 2018

"Windows" "7 x64" "build 7601, Service Pack 1"
"x86-64"
I got around it by placing it in my public folder. The problem I am having now is sourcing functions in my ui. I have R functions that I placed in my app directory and I source them in my ui. Is there any particular your suppose to do this?

@Dripdrop12
Copy link
Member

Dripdrop12 commented Jan 5, 2018

All the files in your app_dir should be installed along with your ui.R and server.R files. It respects any directories you create, so you can use relative references to source those functions into your app. For example, if my_func is in "app_dir/extras", you should be able to source it with: source("extras/my_func.R").

For details, check out ?RInno::files (?RInno::files_section for >= v0.2.0)

@hooty668
Copy link
Author

hooty668 commented Jan 8, 2018

I figured out what was going on with the R Functions, however i am getting the original problem again. Originally I could choose the destination folder to be Public (during installation) and that fixed the problem, Now it doesn't give me that option when I go through the RInno_installer in the app. Any Ideas?

@Dripdrop12
Copy link
Member

That option is controlled by the default_dir argument of create_app (or setup/setup_section). The installer should always give you the option to change the default installation drive. For more information, check out the documentation of default_dir in ?RInno::setup (or ?RInno::setup_section for >= v0.2.0).

@Dripdrop12 Dripdrop12 added the bug label Jan 11, 2018
@ghost
Copy link

ghost commented Feb 22, 2018

I am getting the same error when trying to open an app:
Line: 504
Char: 18
Error: Expected ')'
Code: 800A03EE
Source: Microsoft JScript compilation error

Here is the result of Sys.info():

sysname
"Windows"
release
"7 x64"
version
build 7601, Service Pack 1"
machine
"x86-64"

@peaceengine
Copy link

I am getting the exact same error using Windows 10:
Line: 504
Char: 18
Error: Expected ')'
Code: 800A03EE
Source: Microsoft JScript compilation error

Here is the result of Sys.info():
Windows

= 8 x64
build 9200
DESKTOP-5SUMVE0
x86-64

Any help greatly appreciated! Thank you,

Antony

@biometrica
Copy link

Gentleman, Has this issues been resolved? I obtain an identical to other posters above, following the example provided on the Rinno home page:
install.packages("RInno")
require(RInno)
RInno::install_inno()
example_app(app_dir = "app")
create_app(app_name = "myapp", app_dir = "app")
compile_iss()

The error is given as follow:
Error: Expected ')'
Code: 800A03EE
Source: Microsoft JScript compilation error

This package has a lot of promise, if the error can be resolved!

@peaceengine
Copy link

Unfortunately, not. It's a shame as I'd love to use R to make distributable programs. I need Rinno because the files it has to load up are just too big to use for web. I really don't want to move to Python. Hope it can be solved! ))

@biometrica
Copy link

@peaceengine Thanks for the update. I ended up programming a solution using:
https://www.r-bloggers.com/deploying-desktop-apps-with-r/

However, the above methodology is not as elegant as what Rinno seems to offer, and generates a hefty sized package to distribute to the user. @Dripdrop12 please update users when this is resolved and I'll be sure to retest.

@chasemc
Copy link
Contributor

chasemc commented Apr 12, 2018

I am not able to reproduce this error, and don't know java but you those of you having issues might try replacing in json2.js with this version and reporting if you still get the error.

@J-Sieber
Copy link

I have the same issue. I just tried replacing the json2.js file but it did not solve the issue.

@Dripdrop12
Copy link
Member

It looks like IE does some syntax checking on JScript (which it wrongly recognizes as Java Script), and it expects a ")" in that possition... here is a link that may help in one-off situations.

Is this also happening for people using Chrome?

Regardless, the long term fix is to remove all browsers from the framework by creating a stand-alone UI #21 (thanks @trybik for the inspiration here).

@J-Sieber
Copy link

I use Chrome but also have IE installed. I followed the instructions from the link but still have the issue. Using Windows 10.

@peaceengine
Copy link

I am using Windows 10 and tried with Firefox, Chrome and Edge.

@jackliu333
Copy link

Is there any update on this thread? I'm also facing the same issue.

@Dripdrop12
Copy link
Member

I'm not able to reproduce the error. I've tried it on multiple machines with different configurations, but never gotten it. If someone can figure out what is causing it on their machines, I'd be happy to address it!

@akorejwa
Copy link

akorejwa commented Jun 6, 2018

I get this problem with both my own project and the demonstration example. I have tried it on win 10 and win 7. I have set the default browser to firefox and chrome on the win 10 machine. I tried it with 32 bit and 64 bit R. I don't know if this matters, but R is installed in the Documents folder instead of programs folder and did all programming in RStudio.

@Dripdrop12
Copy link
Member

Is your R library in Documents (that is normal)? Or is the rscript.exe installed there as well?

@akorejwa
Copy link

akorejwa commented Jun 6, 2018

I take back what I said earlier. R is in Programs/, the library is in Documents/. (I didn't see an R folder in the x86 Programs folder and assumed the bin/ was under Documents/R/).

@cwg940
Copy link

cwg940 commented Jun 27, 2018

I was having the same issue. I included all the library dependencies on the ui.R file, and seems to work now.

@J-Sieber
Copy link

J-Sieber commented Jun 27, 2018

I think I have narrowed it down to adding the closing part in server.R. Once I add the session section:

function(input, output, session) {

  output$distPlot <- renderPlot({

    # generate bins based on input$bins from ui.R
    x    <- faithful[, 2] 
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = 'darkgray', border = 'white')

  })

  session$onSessionEnded(function() {
    stopApp()
    q("no")
  })

}

Then I start getting this error. It works before adding in the session section but it does not close properly.

@segoldma
Copy link

segoldma commented Jul 2, 2018

@J-Sieber I started experiencing this error message when adding the onSessionEnded function to my server function as well. Hope this helps

@natewells25
Copy link

Has this been resolved yet? I am stuck at this point.

@stitam
Copy link

stitam commented Jun 24, 2019

I have managed to reproduce the bug and also to get rid of it. When I followed the minimal example (https://cran.r-project.org/web/packages/RInno/vignettes/Introduction.html) it ended up with the error message. But when I also specified the arguments include_R = TRUE and include_Rtools = TRUE) in create_app() it did not end up with the error message. This also worked for my own app. A possible clue: the installer mentioned that the Rtools version on my computer is different from the one in the installer. I forced the version within the installer. Does this help?

Sys.info():
$sysname
[1] "Windows"
$release
[1] ">= 8 x64"
$version
[1] "build 9200"
$machine
[1] "x86-64"

@tobiasblasberg
Copy link

@stitam :
I am facing the same issues and including
include_R = TRUE and include_Rtools = TRUE does not resolve the issue for me.

Unfortunately none of the other approaches for resolving worked neither.

@mxfeinberg
Copy link

@tobiasblasberg @stitam

Has any progress been made toward solving this issue? I've attempted builds on Windows 7 and Windows 10 and I've used the include_R and include_RTools flag but I'm still experiencing the same error.

@peaceengine
Copy link

peaceengine commented Sep 7, 2019 via email

@mxfeinberg
Copy link

@Dripdrop12 do you have any input?

@astimaka
Copy link

Tengo un problema similar, pero creo que es anterior pues cuando instalo la aplicación me entrega un mensaje de error

@rizwanmeer
Copy link

I had an error when opening the app. it seems to have trouble running json2.js. This line in particular:
j = eval('(' + text + ')');
i ran the example and everything was fine. Any ideas on what is happening?

image

just Right Click on file and open with VS COde

@Wladimir-Sanyer
Copy link

Is there any solution? I get the same error

@imransadik
Copy link

I get the same error

@fairking
Copy link

fairking commented Dec 13, 2021

It is because your all .js files are associated with Windows Script Host. So something is executing js files without pointing it to node.js.
To fix the issue find any JS file right click -> Open With -> Choose another app -> Tick checkbox "Always use this app" -> and find you nodejs (usually it is C:/ProgramFiles/nodejs/node.exe). The error should dissapear.

image

Also to execute js files in other apps we rather should use node myscript.js instead of myscript.js.
https://stackoverflow.com/a/39311363/1143349

@jedieaston
Copy link

Also to execute js files in other apps we rather should use node myscript.js instead of myscript.js.

That's the real issue, Windows doesn't have something like the shebang line on *nix. Scripts should be executed by opening their interpreters explicitly instead of praying the user has set their file handlers correctly.

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

No branches or pull requests