Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8412589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:42:36+00:00 2026-06-10T00:42:36+00:00

today my map function started reporting assertion failure 13076 ‘recursive toObject’ code. It worked

  • 0

today my map function started reporting assertion failure 13076 ‘recursive toObject’ code. It worked just fine yesterday.

Here’s my map function:

function () {
    for(i=0; i<this.values.length; i++) {
        emit(this.values[i].id, {
            'id': this.values[i].id,
            'start_date': this.values[i].start_date,
            'end_date': this.values[i].end_date,
            'hash': this.values[i].hash,
            'url': this.values[i].url});
    }  
}

I have tried replacing for loop with forEach function, but result is the same.

What is interesting function with scope variable limiting map function to single emit works just fine:

function () {
    for(i=0; i<this.values.length; i++) {
        if(this.values[i].id == myId) {
            emit(this.values[i].id, {
                'id': this.values[i].id,
                'start_date': this.values[i].start_date,
                'end_date': this.values[i].end_date,
                'hash': this.values[i].hash,
                'url': this.values[i].url});
        }
    }
}

I can, of course, perform this mapping directly in code, but I wouldn’t want to encounter this error some other time when I really need to use MapReduce.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:42:37+00:00Added an answer on June 10, 2026 at 12:42 am

    Ok, so the error message was really vague, but the problem seems to be caused by duplicate value of the ‘id’ field in ‘values’ array. When I changed the id in one of the array elements the function started working again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today I just notice empty_map[key] will create an null element in the map. I
today i hit a really annoing problem with wpf. i just want to align
I've read a multitude of information regarding map projection today. The amount of information
I created the following route: map.todo todo/today, :controller => todo, :action => show_date Originally,
(3.years.ago.to_date..Date.today).map { |date| [date.month, date.year] }.uniq! Returns: [[11, 2008], [12, 2008], [1, 2009], [2,
I was taken aback earlier today when debugging some code to find that something
My brain just isn't working today. I need to test whether a point (lat,
As of...today, it seems, Google Maps no longer has embed code! Can someone point
My application's function about Google Maps doesn't work, the map only displays a grid
Today I read code using a lookup table instead of if-else for clipping two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.