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

captureMetrics doe not seem to be working anymore. #180

Open
marcaaron opened this issue Sep 21, 2022 · 3 comments
Open

captureMetrics doe not seem to be working anymore. #180

marcaaron opened this issue Sep 21, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@marcaaron
Copy link
Contributor

Reproduction:

  • Add captureMetrics: true in Onyx.init()
  • Observe error in JS console
app-c63af0784ac898b80ef3.bundle.js:33823 Uncaught TypeError: getAllKeys is not a function
    at addAllSafeEvictionKeysToRecentlyAccessedList (web.development.js?d0e7:698:1)
    at Object.init (web.development.js?d0e7:1418:1)
    at __WEBPACK_DEFAULT_EXPORT__ (index.js?ce78:22:5)
    at eval (index.js?41f5:12:19)
    at ./index.js (app-c63af0784ac898b80ef3.bundle.js:7140:1)
    at __webpack_require__ (app-c63af0784ac898b80ef3.bundle.js:33820:33)
    at app-c63af0784ac898b80ef3.bundle.js:34910:37
    at app-c63af0784ac898b80ef3.bundle.js:34912:12

I think maybe the lazy import of this code just doesn't work because we are using a bundle that is already built, but not entirely sure

const decorate = require('./metrics');

I think we can just include this in all dev bundles

@marcaaron marcaaron added the bug Something isn't working label Sep 21, 2022
@marcaaron marcaaron self-assigned this Sep 21, 2022
@parasharrajat
Copy link
Member

Here is the reported issue. Expensify/App#10622

@parasharrajat
Copy link
Member

This is the cause on Native https://github.com/Expensify/react-native-onyx/pull/133/files#r975658158.

On the web, the signatures of methods are wrong in metrics/index.web.js

@marcaaron
Copy link
Contributor Author

Ah nice one! Thanks @parasharrajat

@marcaaron marcaaron removed their assignment Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants