Why on earth would anybody suppose that the Second Council of Nicea / Nicaea in 787 was responsible for deciding which books went into the bible? It’s absurd on the face of it, considering the vast mass of patristic testimony and physical bibles that survive.
However I keep seeing ignorant people online who either state this, or seem genuinely uncertain whether they mean the First or Second councils of Nicaea. There is a much more common myth that the canon was decided at the First council in 325, but that’s another story.
Quite by accident today I found what seems to be the source. It is none other than Bart Ehrman, Lost Christianities: The Battles for Scripture and the Faiths We Never Knew, Oxford University Press, 2003. It’s a popular book, not a scholarly work, so it probably circulates among atheists. The reference I was given was to pages 41-43, in which Ehrman talks about the apocryphal Acts of John, as an example of works in which celibacy is praised. In chapter two, pages 41-42 we find this interesting statement:
A comparable message appears in another of the Apocryphal Acts, the last we will consider in this chapter. The Acts of John narrates the legendary adventures of John, the son of Zebedee, one of Jesus’ closest disciples in the New Testament Gospels. He continues to be an important figure after Jesus’ death, according to the early chapters of the canonical Acts of the Apostles, but he quickly drops out of sight in that narrative as the book turns its entire attention to the missionary activities of Paul. Later Christians, not content with the silence shrouding John’s later life, filled the gap with numerous stories, some of which have made it into this second-century Apocryphal Acts of John.23 Once again we are handicapped by not having the complete text. It was, of course, a noncanonical book, and parts of it were theologically dubious to the proto-orthodox. It was eventually condemned as heretical at the Second Council of Nicaea in the eighth century, so that most manuscripts of it were either destroyed or lost.24
(Highlighting is mine) Buried at the back, on p.262, where few will read them, are the notes:
23. It is widely recognized that the surviving Acts of John derives from several sources; most scholars recognize that a large portion of the text (chaps. 87–105, or just 94–102) as we now have it was interpolated at a later time into the narrative. See the discussion in Elliott, Apocryphal New Testament, 303–4. For a translation of some of the more intriguing accounts of the Acts of John, see the excerpts from Elliott in Ehrman, Lost Scriptures, 93–108; that is the translation I am following here.
24. See the discussion in Elliott, Apocryphal New Testament, 303–7.
This, I suspect, is indeed the source for the modern legend. Because of course if the Second council was condemning the Acts of John, it’s “obvious” to a certain type of mind that they were discussing what should be in the New Testament.
Looking at Elliot’s excellent single volume on the NT Apocrypha, we find that the Acts of John are first attested with Eusebius in the 4th century. On the date of the work, Elliot states (p.306):
This is normally given as late second-century, but some scholars (e.g. Zahn) who argued that the work was known to Clement of Alexandria  gave an earlier date. Modern scholars tend to agree that there is no firm evidence that the Acts of John was known before Eusebius.
Schneemelcher concurs (vol. 2, p.152):
It is not possible to demonstrate any use of the Acts of John in the Christian literature of the 2nd and early 3rd centuries.
On page 305, Elliot states:
(e) The proceedings of the Second Council of Nicaea (AD 787) are contained in several Greek and Latin manuscripts, and also in the Latin version by Anastasius.5 Citations in them from the Acts of John 27-8, 93-5, and 97-8 are valuable for establishing the Greek text at these points (see Junod and Kaestli CCA, pp. 344-68).
The condemnation of the Acts of John by the Second Council of Nicaea meant that the ancient Acts could only survive in clandestine copies after 787. Parts survived in the rewritings of the story of John found in Pseudo-Prochorus, and (in Latin) in Pseudo-Abdias and Pseudo-Melito.
5. J. C. Thilo, Colliguntur et commentariis illustrantur fragmenta actuum S. Johannis a Leucio Charino Conscriptum, i. in Universitatis Literariae Fridericianae Halis consociatae programma paschale (Halle, 1847), 14f.
This suggests that Elliot is also repeating from elsewhere, just as Ehrman was. Is it possible that nobody ever actually looks at the statements of Nicaea II?
Schneemelcher is rather clearer:
The most important evidence of all is provided by the Nicene Council of 787, already mentioned. Its fifth session dealt, among other matters, with the Acts of John, to which the Iconoclastic Council of 754 had appealed. Here AJ 27 and the first half of AJ 28 were read out from the pseudepigraphical ‘Travels of the Holy Apostles’ as a document hostile to images, together with a large part of AJ 93-98 as a general indication of the book’s heretical character.42
42. Con. Nic. II, actio V (Mansi XIII, cols. 168D-172C); critical edition of the quotations from the Acts of John in Junod/Kaestli 361-365 (Greek text) and 366-368 (Latin translation of Anastasius Bibliothecarius). [‘Junod/Kaestli’ is the standard edition, Acta Johannis, in the Corpus Christianorum, series apocryphorum, vols 1-2, Turnhout 1983]
This gives us the reason why the book was discussed – that it had been used in the Iconoclast disputes – and a source for the council text. There is actually an English translation of the Acts of the Second Council of Nicaea (787), under that title in two volumes, from Translated Texts for Historians, vol. 68 (2018), translated by Richard Price, and available for only $175. Unfortunately this is inaccessible to me, or we might hear what the council said.
The older pre-critical text of Mansi is thankfully available online here, in a very poor scan from microfilm. Col. 167 has a section starting Ex falsis superscriptionibus itinerariorum sanctorum apostolorum, (On the false attributions of the “itineraries of the holy apostles”). But the good stuff appears in column 171C, and continues to 175. The delegates read out some short quotes which contradict the Gospel of John, and so must be heretical. Especially good:
Gregory of Neocaesarea said, “This codex is worthy of every condemnation and dishonour. And they produced out of it testimonies against images!! which were copied by Lycomedes!”
John the most reverend monk and vicar of the oriental patriarchs, said, “Lycomedes brings in the crowned images of the apostles as if they were pagan idols!”
Basil bishop of Ancyra said, “God forbid that St John seem to speak contrary to his own well-established gospel!”
I don’t know who Lycomedes was – evidently an iconoclast leader – but I don’t think they liked him.
The section ends with:
John, most reverend monk and vicar of the orient pontiffs said, “If it please this holy and universal synod, let this be the sentence, that nobody henceforth shall make copies of this sordid book.”
The holy synod said, “Let nobody make a copy: not only this, but we judge that it is right that it must be thrown in the fire.
Let’s finish, for the benefit of Ehrman readers, with another quotation from him about the formation canon of the NT. This time it’s from Truth and Fiction In The Da Vinci Code, Oxford University Press, 2004, p.74:
Teabing’s conspiratorial view of the formation of the canon is intriguing, but for the historian familiar with the actual process of how some books came to be included in the New Testament while others came to be excluded, it is filled with more fiction than fact. The historical reality is that the emperor Constantine had nothing to do with the formation of the canon of scripture: he did not choose which books to include or exclude, and he did not order the destruction of the Gospels that were left out of the canon (there were no imperial book burnings). The formation of the New Testament canon was instead a long and drawn-out process that began centuries before Constantine and did not conclude until long after he was dead. So far as we know, based on our historical record, the emperor was not involved in the process. … (75) … It was a process that took many years—centuries, actually. It was not (contrary to Teabing’s view) the decision of one person, or even just one group of persons (for example, a church council); …