My map reduce was working fine, then I created ano...
# ask-stanley-ai
t
My map reduce was working fine, then I created another deployment and when I run it manually, it doesn’t run and fails all stages. I removed and all the code and just added logs they are also not printing and giving errors
c
AI generated answer (using internal Slack threads):
Based on the conversations, there could be several reasons why your Map/Reduce script is failing at all stages: 1. File Extension: Ensure that your script file has the correct
.js
extension. If the script file is not named with a
.js
extension, it can lead to unexpected behavior. 2. Log Level: Check the log level on your deployment. If it's set to
Error
, it won't register your
log.debug
statement. 3. Script Version: If you're using SuiteScript 2.1, consider switching back to SuiteScript 2.0. Some users have reported fewer errors and strange behaviors with SuiteScript 2.0. 4. Search Parameters: If you're using a search in your script, try testing a different search. Some searches, like subsidiaries, have been known to cause problems. 5. Context Usage: Ensure you're using the correct context for each stage. For example, the context for a
map
is not used the same as the context for a
summarize
. 6. Permissions: Make sure the script is deployed with the correct permissions. For example, only administrators can run scheduled scripts. If a user event script calls
ScheduledScriptTask.submit()
, the user event script has to be deployed with admin permissions. 7. Server Performance: If your script is stuck in the
Processing
stage for a long time, it could be due to server performance. Some servers, like the test drive account on na1 servers, have been reported to have poor performance. If none of these solutions work, you might want to consider deleting the script and trying again. If the problem persists, it might be an issue with your sandbox environment. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825258672
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.804577112
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.801559746
Please provide your feedback on this answer.