RangeError: Maximum call stack size exceeded Error in Spartacus - upgrade

We have updated the Spartacus version 4.1.0 to 5.0.0.
We are calling the getSelectedPaymentTypeState() method in the payment type screen. But i am getting the following error.
node_modules_spartacus_checkout_fesm2020_spartacus-checkout-base_mjs.js:2
RangeError: Maximum call stack size exceeded
at Subscriber._error (Subscriber.js:75:26)
at Subscriber.error (Subscriber.js:55:18)
at MapSubscriber._error (Subscriber.js:75:26)
at MapSubscriber.error (Subscriber.js:55:18)
at FilterSubscriber._error (Subscriber.js:75:26)
at FilterSubscriber.error (Subscriber.js:55:18)
at SwitchMapSubscriber.notifyError (innerSubscribe.js:45:26)
at SimpleInnerSubscriber._error (innerSubscribe.js:13:21)
at SimpleInnerSubscriber.error (Subscriber.js:55:18)
at SwitchMapSubscriber.notifyError (innerSubscribe.js:45:26)

Without seeing the code for the getSelectedPaymentTypeState() method, it's difficult to say for certain what's causing the issue.
but the error indicates that there is a stack overflow occurring in your code, which can happen when a function calls itself recursively without a proper exit condition.
Suggestion:
Check if the update from Spartacus 4 to 5 introduced any breaking changes that could be causing the issue. Review the release notes and any relevant documentation to ensure that your code is still compatible with the new version.

Related

How to Troubleshoot Dexie bound on IDBKeyRange Error

I'm using Dexie.js version 3.0.3-rc.3 in a Vue JS project and I occasionally run into this exception in Chrome (86):
Failed to execute 'bound' on 'IDBKeyRange': The parameter is not a valid key.↵ DataError: Failed to execute 'bound' on 'IDBKeyRange': The parameter is not a valid key.
Here's a screenshot of the full error:
I'm fairly certain the problem lies with something in my data being undefined, but I'm trying to find a good way to troubleshoot this. I paused the Chrome dev tools on exceptions and inspected the code around this particular part of Dexie, but it doesn't reveal what data was used to make this exception occur.
Does anyone have any suggestions on how to find out what's actually wrong? It feels a bit like a needle in a haystack.
== Update ==
Below is the full call stack:
Try inspecting the call stack. I know it can be long until you reach a frame within your application code, but the failing call should be there!

WebDriverException: Method has not yet been implemented (WARNING: The server did not provide any stacktrace information)

I want to perform click and scroll down action on a element .
* Already i tried with Action class
* javascript executor.
* Robot class
First I am trying to click on element and hold it for a while and then scroll till expected element finds but I am getting error as method has not yet been implemented.
WebDriverException: Method has not yet been implemented (WARNING: The server did not provide any stacktrace information)
1.The above error comes when your app is not matching with the current context
2.According to your code there is a need of context change of app environment you can change context using driver.context("YOUR APP CONTEXT NAME")
3.Some times there must be error in your code like it is not locating correct element or may be you are using unwanted method
Try above 2 points it might help you
if it is not working sorry for wasting your Testing time
Happy Testing

GWT Error Popup

The error popup with the following error message comes on the screen repeatedly when application is in idle state (no user activity is performed).
Error occurred on client: (TypeError): Unable to get property 'iterator_0' of undefined or null reference.
number: -2146823281
at handleEvent_206....EF34544...cache.html
at dispatchEvent_0..EF34544...cache.html
at sucess_184 ..
..
Can anyone give some pointers to navigate to the problamatic area in the code?
The fact that you're getting it repeatedly is probably due to the fact that you're performing an action on a timer (i.e. perform repeatedly an action).
From the small snippet you've shown, I don't think there's anything we can deduce. Do you have a larger stacktrace? It is still possible the error is in your own code (trying to invoke iterator() on a null object).

I got error while simulate code written in PROMELA

I am using ispin and got an error stating spin: trails end after 10 steps and transition fail.
How can I prevent this error from happening?
You prevent the error from happening in one of two ways:
fix your Promela model - you have a bug in your Promela that needs to be removed
you've found an error in the system that you are modeling. Congratulations. You now report the error to the person in charge of the system that you are modeling.
In practice, when you have a trail indicating an error, you next perform
spin -p -t <name of the model>.pml
which will print out the step by step model executions that lead to the error. You scour them to confirm that they are correct - if so, see #2 above; if not correct, see #1.
I had the same problem and it is fixed after putting -DVECTORSZ :
in the advanced parameters settings window of verification tab.I have also increased the physical memory to 2048.

Exception when running on simulator 3.2

I'm testing my app on simulator 3.1.3, it runs fine.
When it come to simulator 3.2, it crashes right from the beginning:
2010-06-24 16:35:29.208 MyTestApp[6991:207] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'This coder requires that replaced objects be returned from initWithCoder:'
2010-06-24 16:35:29.213 MyTestApp[6991:207] Stack: (
46195275,
2520474889,
46194715,
46194554,
6387912,
6392266,
5568184,
6388086,
6386450,
6392266,
5564974,
5573454,
3555255,
3560368,
3586056,
3567777,
3599431,
52998524,
45735996,
45731912,
3559044,
3591649,
10824,
10678
)
As far as I know, I do not use the "initWithCoder" method (do not really know what this is though).
How can I know where the exception is thrown so I could have a better understanding of what is causing the problem?
ps: I have added an exception in Breakpoint: objc_exception_throw (with location libobjc.A.dylib, strangely I had to enter the location manually, I expected xcode to find it for me when I added objc_exception_throw). But still the same trace and no more information.
This page should provide some helpful info: Debugging Tips for Objective-C
Of particular interest is the console command info line *. Every one of those numbers listed by the exception log is an address on the stack. Those bottom ones in the 10,000 and below range are usually located in the app's main method, for example. The highest ranged addresses tend to represent the default libraries.
Using the command info line *10678 would likely return some info about a specific line in the main method, which doesn't help very much. Normally the trick is to find the highest address before the default libraries begin. I'm unsure how much this will help your problem in particular, seeing as there's a huge gap between the expected small addresses and the next highest up. In any case, start with the smallest address above the bottom two (3555255 from what I can see in the log you posted) and see if it returns a line from one of your own code files. If it does, check the one above it, and so on until you find the last address from your own code. Hope this helps.
I figured out the reason of this error. I had created an object of type NSDictionnary within IB and it seems it was not the correct way to do this. Instead I have programmatically created this same object in XCode and this works fine. Seems like it was some kind of persistent problem.