parse-community / parse-community/parse-server

Remove globally pinned `Parse` instance

Open
#10,077 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
Issue

Parse Server uses and provides a globally pinned Parse object for use in Cloud Code. This is a problematic design because the globally pinned instance may be initialized properly for use in Cloud Code (masterKey, appId, serverURL, etc.), but another module like the push adapter may use a different version of parse dependency, which prevents npm from deduplicating the dependency. Code that references that other version uses an uninitialized instance of Parse which causes the error: Cannot use the Master Key, it has not been provided..

Fix

Remove the global pinning and explicitly import Parse wherever needed. Also explicitly expose the initialized Parse instance via a Parse Server API, like Parse.Server or Parse.Cloud.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the globally pinned Parse instance through Cloud Code and the push adapter, then inspect how Parse.Server or Parse.Cloud could expose the initialized instance. Done means the global pin is removed, consumers use the initialized instance, and the reported Master Key failure is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api, backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.