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

All queries fail #135

Open
5 tasks
pranamp opened this issue Nov 7, 2024 · 5 comments
Open
5 tasks

All queries fail #135

pranamp opened this issue Nov 7, 2024 · 5 comments
Assignees
Labels
question or help Clarification or help may suffice to resolve

Comments

@pranamp
Copy link

pranamp commented Nov 7, 2024

Issue submission checklist

When filing your issue please make an attempt to troubleshoot a little bit on your own. If your issue is specifically related to a query, but please consider using the "Query issue template". Also, please consider some of the suggestions below before submitting an issue. Thank you!

  • I have set verbose=TRUE function argument if possible.

  • I have tried a few different function call arguments to see if I can workaround and/or isolate the issue (e.g. reviewing the output from the "SOAP" vs "REST" or the "Bulk 1.0" vs "Bulk 2.0" or tinkering with the control argument in the function call).

  • I have taken a look at the unit tests directory ./tests/testthat/ to see if my type of issue has been documented and tested.

  • I have considered making a minimal reproducible example using the reprex package. Details on how to create a reprex are available here: https://www.tidyverse.org/help/#reprex.

  • I have included the version of R and any packages that are used (Hint: Simply copy/paste the result of devtools::session_info() at the bottom of your issue).

Thank you for considering these steps. It will speed up the process of resolving your issue.


Issue description

A brief description of the problem.

Hi Steven. Thank you for creating and maintaing this great library. It has been so useful for my work. However since Sunday, 3 November 2024, I am unable to run any queries on using SalesforceR. Queries that have worked previously no longer work. The errors popping up were initially API errors like "No such column x on entity y" so I thought that the source table had changed. After removing the "missing" columns, I get an empty dataset. I've tried the same query using the Python simple-salesforce library and the all the data is extracted with no missing columns so I assume there is a an issue with SalesforceR currently. I have tried all the API types with no luck but, when using "Bulk 2.0", the resulting dataframe has the right column names but no rows.

reprex

# consider inserting a reprex here

Session Info

# consider inserting the output of devtools::session_info() here 
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.1 (2024-06-14)
#>  os       Ubuntu 22.04.5 LTS
#>  system   x86_64, linux-gnu
#>  ui       X11
#>  language en_GB:en
#>  collate  en_GB.UTF-8
#>  ctype    en_GB.UTF-8
#>  tz       Europe/London
#>  date     2024-11-07
#>  pandoc   3.2 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/x86_64/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version     date (UTC) lib source
#>  cachem        1.1.0       2024-05-16 [1] CRAN (R 4.4.0)
#>  cli           3.6.3       2024-06-21 [1] CRAN (R 4.4.1)
#>  devtools      2.4.5       2022-10-11 [1] CRAN (R 4.4.1)
#>  digest        0.6.37      2024-08-19 [1] CRAN (R 4.4.1)
#>  ellipsis      0.3.2       2021-04-29 [2] CRAN (R 4.1.2)
#>  evaluate      1.0.1       2024-10-10 [1] CRAN (R 4.4.1)
#>  fastmap       1.2.0       2024-05-15 [1] CRAN (R 4.4.0)
#>  fs            1.5.2       2021-12-08 [2] CRAN (R 4.1.2)
#>  glue          1.6.2       2022-02-24 [2] CRAN (R 4.1.2)
#>  htmltools     0.5.8.1     2024-04-04 [1] CRAN (R 4.4.0)
#>  htmlwidgets   1.6.4       2023-12-06 [1] CRAN (R 4.4.0)
#>  httpuv        1.6.15.9000 2024-06-03 [1] Github (rstudio/httpuv@ff00e6b)
#>  knitr         1.48        2024-07-07 [1] CRAN (R 4.4.1)
#>  later         1.3.2       2023-12-06 [1] CRAN (R 4.4.0)
#>  lifecycle     1.0.4       2023-11-07 [1] CRAN (R 4.4.0)
#>  magrittr      2.0.3       2022-03-30 [2] CRAN (R 4.1.2)
#>  memoise       2.0.1       2021-11-26 [1] CRAN (R 4.4.0)
#>  mime          0.12        2021-09-28 [2] CRAN (R 4.1.2)
#>  miniUI        0.1.1.1     2018-05-18 [1] CRAN (R 4.4.1)
#>  pkgbuild      1.4.4       2024-03-17 [1] CRAN (R 4.4.0)
#>  pkgload       1.4.0       2024-06-28 [1] CRAN (R 4.4.1)
#>  profvis       0.4.0       2024-09-20 [1] CRAN (R 4.4.1)
#>  promises      1.3.0       2024-04-05 [1] CRAN (R 4.4.0)
#>  purrr         1.0.2       2023-08-10 [1] CRAN (R 4.4.0)
#>  R6            2.5.1       2021-08-19 [2] CRAN (R 4.1.2)
#>  Rcpp          1.0.13      2024-07-17 [1] CRAN (R 4.4.1)
#>  remotes       2.5.0       2024-03-17 [1] CRAN (R 4.4.0)
#>  reprex        2.1.1       2024-07-06 [1] CRAN (R 4.4.1)
#>  rlang         1.1.4       2024-06-04 [1] CRAN (R 4.4.1)
#>  rmarkdown     2.28        2024-08-17 [1] CRAN (R 4.4.1)
#>  rstudioapi    0.16.0      2024-03-24 [1] CRAN (R 4.4.0)
#>  sessioninfo   1.2.2       2021-12-06 [1] CRAN (R 4.4.0)
#>  shiny         1.9.1       2024-08-01 [1] CRAN (R 4.4.1)
#>  urlchecker    1.0.1       2021-11-30 [1] CRAN (R 4.4.0)
#>  usethis       3.0.0       2024-07-29 [1] CRAN (R 4.4.1)
#>  vctrs         0.6.5       2023-12-01 [1] CRAN (R 4.4.0)
#>  withr         2.5.0       2022-03-03 [2] CRAN (R 4.1.2)
#>  xfun          0.48        2024-10-03 [1] CRAN (R 4.4.1)
#>  xtable        1.8-4       2019-04-21 [1] CRAN (R 4.4.0)
#>  yaml          2.3.5       2022-02-21 [2] CRAN (R 4.1.2)
@StevenMMortimer
Copy link
Owner

StevenMMortimer commented Nov 8, 2024

@pranamp Thanks for flagging. I can't help without more information. Can you try the following items I've listed below and provide some example SOQL that would help provide some direction for where to look for issues?

  • Delete your .httr-oauth-salesforcer token to ensure that you know which organization/environment your session is running against. It's possible you're not connecting to the same org as when you use simple-salesforce.
  • Set verbose=TRUE function argument if possible.
  • Tried a few different function call arguments to see if I can workaround and/or isolate the issue (e.g. reviewing the output from the "SOAP" vs "REST" or the "Bulk 1.0" vs "Bulk 2.0" or tinkering with the control argument in the function call).
  • Check if you've changed API versions. Salesforce could have changed formats between API versions and those newer versions might not work with the existing salesforcer functions so I'd have to fix.

@pranamp
Copy link
Author

pranamp commented Nov 13, 2024

Thanks Steven. I've tried all of the steps except the first one without luck as I cannot find that file. The API version is 58 and has been for quite a while. It seems like I'm just blocked out for some reason

@EliseyGretchko
Copy link

Thanks Steven. I've tried all of the steps except the first one without luck as I cannot find that file. The API version is 58 and has been for quite a while. It seems like I'm just blocked out for some reason

@pranamp the .httr-0auth-salesforcer file is a hidden file. You could try to google on how to find hidden files for your specific file manager. This is file should have been generated the first time you've authenticated.

@pranamp
Copy link
Author

pranamp commented Nov 20, 2024

@EliseyGretchko, thank you. I've found the file and deleted it but the error persists. Reprex gives me the following:

salesforcer
#> Error: object 'salesforcer' not found

Created on 2024-11-20 with reprex v2.1.1
#> Error in parse(text = input): attempt to use zero-length variable name

and the console gives:

Request failed [400]. Retrying in 1.5 seconds...
Request failed [400]. Retrying in 2.4 seconds...
Error: INVALID_FIELD:
ERROR at Row:2:Column:36
No such column 'xxxx' on entity 'zzzz'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

I know the field definitely exists as I can extract it on Python with the same query

@StevenMMortimer
Copy link
Owner

StevenMMortimer commented Dec 2, 2024

@pranamp Can you provide an example of the function call you're running? It should look something like this:

recordset <- sf_query(soql="SELECT Id FROM Account")

It would also help if you include the argument verbose=TRUE in the function call and share the output from the console. I would advise that you check it doesn't contain any sensitive information before posting on GitHub.

@StevenMMortimer StevenMMortimer added the question or help Clarification or help may suffice to resolve label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question or help Clarification or help may suffice to resolve
Projects
None yet
Development

No branches or pull requests

3 participants