Electron : window['pdfjs-dist/build/pdf.hjs'] undefined - pdf

17/08/2021, no issues.
18/08/2021: For some reason overnight, there has been 0 changes in the code itself,
const pdfjsLib = window['pdfjs-dist/build/pdf']
pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js'
pdfjsLib stays undefined in the Electron app version of the application.
However, in the browser version, there is still no issue.
Hence, we can't work with PDFs anymore in the app. Who can explain how it suddenly doesn't work anymore after 1 year, and even better, who has a solution for this?

I think you are having the same issue that prompted my SO question last year: as mentioned here you "You should never directly link to mozilla.github.io/pdf.js since it changes on every push to master."
Not that a direct install is flawless, mind you: I came here today to ask about it again, and your question came up for a possible duplicate before posting.

Related

shopify-buy SDK cant checkout or add items to cart anymore

Recently all my Shopify apps have stopped working due to this error. I can still pull data from the api (photos, titles, etc) but I can no longer add items to my cart or check out. this error isn't just happening on my current build but previous builds too. I think I might have made too many requests due to refreshing pages and have been banned from the API temporarily (I've had this happen with another API before). but it's now been 2 days and still no fix.
I'm pretty confident there's nothing wrong with my code because it's happening to other websites that were working before & haven't been touched for a while.
package used: "shopify-buy": "^2.11.0"
Thanks,
Mitchell D
turns out this error occurred because I was in PAUSE AND BUILD mode. so I must be on a plan to add items to the cart using the API? they must have made this change recently

MediaWiki: Getting "readapidenied" error instead of login token

That's a quite puzzling problem. I've multiple MediaWiki installations. In this specific case: Version 1.34.
Now I can login to all of these MediaWikis. Everything works fine.
Now I can access all of these MediaWikis via API --- EXCEPT ONE. The strange thing is: All of them are configured almost identical. I even copied the configuration from one wiki where everything was working to the second wiki.
To be more precise. If I send ...
/wikiA/api.php?action=query&meta=tokens&format=json&type=login
... I get a very reasonable answer, e.g.:
{"batchcomplete":"","query":{"tokens":{"logintoken":"37ec2e690eeb48a10ac66b2ccbca2b576000f9f4+\\"}}}
If I send ...
/wikiB/api.php?action=query&meta=tokens&format=json&type=login
... I get the following answer, e.g.:
{"error":{"code":"readapidenied","info":"You need read permission to use this module.","*":"See http://xxx.xxx.xxx.xxx/wikiB/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."}}
This can be reproduced using any web browser.
Q: What could be the reason that on this wikiB I even can't access the normal login module? It can't be the configuration. It's almost completely identical. It can't be the source code. I ran a diff on the PHP files and found no significant differences. What could be wrong here? It seems it must be something with the database. But how do I approach this? Does anyone have an idea? I would appreciate it very much if you could help!
I analyzed the data base: No difference. I did more research using google: And found a bug report.
It's a bug in MediaWiki. They provided an official software release with THAT kind of bug.
It turnes out there is a 1.34.0 version and a 1.34.1 version. My WikiA has 1.34.1 while WikiB had 1.34.0. After copying this one single file includes/api/ApiQuery.php from WikiA to WikiB and everything worked fine.
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/580097/

Ionic 3 - Load translation from API URL

I'm actually working on a mobile app with Ionic 3, everything is ok till now. Eveything work fine. I set translation with ngx-translate. So i got all my files in a folder "/assets/i18n/". I can call my data in templates or components so everything is ok.
But my client, wants that those translation files come from a web API. SO they can update them as they want. I searched here on found some things like this link "Ngx-translate - TranslateHttpLoader with external URL" ( I didn't want to answer this topic cause I don't have answer, just questions and as my profile is new I can't comment it )
I read all of this but i can't understand it perfectly so, i keep missing something, so please how can i create a custom loader for calling those translation file ?
I tried to create a provider/service but is that a specific kind of file for a loader ? Where to put it in my app ?
That's the last stop for my app to run. So please if someone know the answer can you help me a little bit with it ? I want to understand exactly how to call those json film from URL !
I can add more code if you want, but actually i got no error i just don't know how to create this "loader" from last topic. And where to put it.

React Native + Redux + HMR + connect

I'm trying to get stuff working but I can't success.
Initially I get the following error :
<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically.
See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions.
I followed instructions on the page, it was hard to understand that I had to put the store creation in the index.android.js and pass it as a prop, where the HMR does not rerender stuff so the store is not created again. But I finally get rid of the error.
I can now see that my store is update in the module.hot.accept function in the App/Redux/createStore function when I change any reducer, the App/Redux/SearchRedux initial state for exemple.
But my application state is not refreshed at all if I edit a reducer ! Even worst, when I do that the whole app gets disconnected from the state (but I havn't exemple on this simpler app so lets focus on the state not getting reinjected).
I can see it in App/Navigation/ReduxNavigation
You can reproduce the bug easily by cloning the repo.
I struggle on this one since this morning, time starts to be long so I finally post on SO. I've read a lot of stuff related to this issue but its obvious I'm missing something.
PS: Initially I wrote this with many links to the files so you can directly see what I mean with code. But I have few reputation despite I use the site for few years (because I always found answers, not this time)
You will find this question with the links in the repo readme, it will be easier to see files I'm talking about.
Thanks

encounter error when adding a new tab in the back office, prestashop

I don't know if there are many people working with Prestashop here....anyway, i am facing a problem and i cant find an answer.
I am trying to add a new tab to the back end, but all the get is this message:
An error occurred while creating object.Tab()
I also tried to add a new tab on a fresh installed prestashop, also encountered this problem. the version that i am using is 1.4.5.1.
I also tried to find a solution and i found a ticket describing this problem, but still no result.
Hey guys this is actually a 1.4.5.1 version's bug, i upgrade to 1.4.6.2 everything just works fine.
No idea if this is helpful, but check this if it helps you in some sense, its something about database tables:
http://forge.prestashop.com/browse/PSCFI-4171?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs