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

Error if custom function IDs are the same ignoring periods and underscore #1009

Open
parched opened this issue Jun 1, 2023 · 1 comment
Open
Assignees

Comments

@parched
Copy link

parched commented Jun 1, 2023

Bug Report

  • Host: Excel
  • OS: Windows
  • Browser: (fill out if relevant/applicable)
  • Environment: (fill out. eg: alpha, beta, prod)

Expected behavior:

I expect to be able to create two functions that have different IDs ignore case.

Actual behavior:

Steps to Reproduce:

/**
 * Calculates the volume of a sphere.
 * @customfunction SPHERE_VOL
 * @param {number} radius
 * @returns The volume of the sphere.
 */
function sphereVolume(radius) {
  return (Math.pow(radius, 3) * 4 * Math.PI) / 3;
}

/**
 * Calculates the volume of a sphere.
 * @customfunction SPHERE.VOL
 * @param {number} radius
 * @returns The volume of the sphere.
 */
function sphereVolume2(radius) {
  return (Math.pow(radius, 3) * 4 * Math.PI) / 3;
}

Failure Logs:

Error:
{
    "stack": "RichApi.Error: The request is aborted.\n    at new n (https://appsforoffice.microsoft.com/lib/beta/hosted/excel-win32-16.01.js:26:258943)\n    at o.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/beta/hosted/excel-win32-16.01.js:26:323277)\n    at https://appsforoffice.microsoft.com/lib/beta/hosted/excel-win32-16.01.js:26:321339",
    "message": "The request is aborted.",
    "name": "RichApi.Error",
    "code": "RequestAborted",
    "traceMessages": [],
    "innerError": null,
    "debugInfo": {
        "code": "RequestAborted",
        "message": "The request is aborted.",
        "errorLocation": "CustomFunctionManager.register",
        "statement": "v.register(...);",
        "surroundingStatements": [
            "var workbook = context.workbook;",
            "var v = Microsoft.ExcelServices.CustomFunctionManager.newObject();",
            "// >>>>>",
            "v.register(...);",
            "// <<<<<"
        ],
        "fullStatements": [
            "Please enable config.extendedErrorLogging to see full statements."
        ]
    },
    "httpStatusCode": 500
}

Screenshot:

This is what it looks like after that error.
It says they have been registered correctly, but clearly have not.

image

@alison-mk
Copy link

Hi @parched, thanks for submitting this issue.

@jiju-MS Can you take a look at this custom functions issue in the Script Lab repository?

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

4 participants