nativescript-community / texttospeech

Text to Speech NativeScript plugin for Android & iOS :loudspeaker:
http://nativescript-community.github.io/texttospeech/
MIT License
50 stars 24 forks source link

for IOS it is throwing 'NativeScript encountered a fatal error: TypeError: Attempted to assign to readonly property. at #18

Closed shivabala1986 closed 4 years ago

shivabala1986 commented 5 years ago

2.0.2 is working fine in IOS, but when installed 2.0.3 then i getting below errors while running app with bundle Native stack trace: 1 0x10f175c1f NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState, JSC::Exception, bool, bool) 2 0x10f1aacaf -[TNSRuntime executeModule:referredBy:] 3 0x10ebac203 main 4 0x112e48575 start JavaScript stack trace: 1 __@file:///app/vendor.js:78580:29 2 @file:///app/vendor.js:78581:90 3 @file:///app/vendor.js:78587:14 4 ../node_modules/nativescript-texttospeech/texttospeech.js@file:///app/vendor.js:78606:2

dungfv commented 5 years ago

I'm having same a problem. @shivabala1986 Did you had a solution?

amorgulis commented 5 years ago

I took a look at the compiled code in vendor.js and the error is pointing to this statement: this.constructor = d;. I noticed there's a "use strict" above it and I thought it might have to do with that, so I removed it and it fixed the problem. I believe "use strict" is there because of "noImplicitUseStrict": false inside tsconfig.json.

Hope this helps to track down a fix.

willycandra84 commented 4 years ago

same issue, any news?

cloudhx commented 4 years ago

I'm having the same issue, hoping there will be a fix soon.

bradmartin commented 4 years ago

I've just updated the demo app and it works fine on iPhone running iOS 13.3

Can anyone provide more info or usage, confirm that the demo app fails for you on an actual device. Simulators aren't useful for speech, so if this is on a simulator, I'd suggest getting real hardware for iOS.

Klunk75 commented 4 years ago

Hi, same issue here with 2.0.3 version... I've tried on an iPhone 6 with iOS 12.4.2. I'm using Nativescript with Angular and used the code as in your latest demo. No problem on Android. Regards

gurvancampion commented 4 years ago

I just tried with an iPhone 6 with iOS 12.4.6 on version 2.0.3 have this issue. Downgraded on version 2.0.2 no problem anymore

bradmartin commented 4 years ago

I don't use iOS personally, but what's preventing everyone from upgrading to 13x? Do the iphone6 not run it? I have a 7 Plus and it is on the latest iOS. Just curious since that's 2 reports of running iOS 12 now with the issue but with 13.3 I did not see the issue.

gurvancampion commented 4 years ago

I'm not an iOS user but I cannot upgrade to iOS 13 on the iPhone 6 I have. I used this iPhone for to only to test my NS projects works the same as on Android. Do you have an idea of what could be wrong?

bradmartin commented 4 years ago

Understand, so older model iphone 6 can't upgrade to 13. I'm not sure what changed. I'd have to check the diffs in the packages. If you'd like to do that for me and post the diffs we can work to push a bug fix to prevent the issue on latest stable.

ahmetceylan commented 4 years ago

I can confirm the demo app is working on both emulator and real devices that have iOS 13.2, but it is loading the project from local path( In package.json; "nativescript-texttospeech": "file:../src" -- not compiled version from typescript), After I changed it to npm repo, I saw different version of this error on startup. it says :

(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Building UI from XML. @app-root.xml:1:1
> Attempted to assign to readonly property.
at
file: node_modules/@nativescript/core/ui/builder/builder.js:202:0 

To fix this problem I added ""noImplicitUseStrict": true" in tsconfig.json file as mentioned above.